Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86: revert removing soc.h from atom soc #69758

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/x86/core/early_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <zephyr/sys/device_mmio.h>
#include <zephyr/sys/util.h>
#include <zephyr/drivers/pcie/pcie.h>
#include <soc.h>


#if DT_PROP_OR(DT_CHOSEN(zephyr_console), io_mapped, 0) != 0
Expand Down
7 changes: 3 additions & 4 deletions drivers/counter/counter_cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
* crossing clock domains (no pun intended). Use accordingly.
*/

#include <zephyr/spinlock.h>
#define DT_DRV_COMPAT motorola_mc146818

#include <zephyr/drivers/counter.h>
#include <zephyr/device.h>
#include <limits.h>

#define DT_DRV_COMPAT motorola_mc146818
#include <soc.h>

/* The "CMOS" device is accessed via an address latch and data port. */

Expand Down
1 change: 1 addition & 0 deletions drivers/disk/nvme/nvme_controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ LOG_MODULE_REGISTER(nvme, CONFIG_NVME_LOG_LEVEL);

#include <zephyr/kernel.h>

#include <soc.h>
#include <zephyr/device.h>
#include <zephyr/init.h>

Expand Down
2 changes: 2 additions & 0 deletions drivers/timer/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include <zephyr/dt-bindings/interrupt-controller/intel-ioapic.h>

#include <soc.h>

/**
* @file
* @brief HPET (High Precision Event Timers) driver
Expand Down
60 changes: 60 additions & 0 deletions soc/intel/atom/soc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2010-2015, Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

/**
* @file
* @brief Board configuration macros for the ia32 platform
*
* This header file is used to specify and describe board-level aspects for
* the 'ia32' platform.
*/

#ifndef __SOC_H_
#define __SOC_H_

#include <zephyr/sys/util.h>

#ifndef _ASMLANGUAGE
#include <zephyr/device.h>
#include <zephyr/random/random.h>
#endif
Comment on lines +18 to +23
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none of these seem to be required by this file, only toolchain.h for ARG_UNUSED?


/* PCI definitions */
/* FIXME: The values below copied from generic ia32 soc, we need to get the
* correct numbers for Atom and the minnowboard
*
* This is added now to get basic enumeration of devices and verify that PCI
* driver is functional.
*/
#define PCI_BUS_NUMBERS 1

#define PCI_CTRL_ADDR_REG 0xCF8
#define PCI_CTRL_DATA_REG 0xCFC

#define PCI_INTA 1
#define PCI_INTB 2
#define PCI_INTC 3
#define PCI_INTD 4

/**
*
* @brief Convert PCI interrupt PIN to IRQ
*
* @return IRQ number, -1 if the result is incorrect
*
*/

static inline int pci_pin2irq(int bus, int dev, int pin)
{
ARG_UNUSED(bus);

if ((pin < PCI_INTA) || (pin > PCI_INTD)) {
return -1;
}
return 10 + (((pin + dev - 1) >> 1) & 1);
}

#endif /* __SOC_H_ */
1 change: 1 addition & 0 deletions subsys/bluetooth/host/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <zephyr/sys/byteorder.h>
#include <zephyr/debug/stack.h>
#include <zephyr/sys/__assert.h>
#include <soc.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit surprising. What does hci_core.c need this for? I'd have expected to see reports of build failures, etc if it was absolutely necessary there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

soc.h should not be on a subsys level file


#include <zephyr/settings/settings.h>

Expand Down
Loading