summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-08-14 13:43:23 -0400
committerTom Rini <trini@konsulko.com>2015-08-14 16:27:16 -0400
commit632093b566569329bc6e5b0893bdca01de905314 (patch)
treeddd8cb84789bf0bc60a566fd8d33ff138d6861e9 /include
parent61dfa65e405f2713dfc8090ed8147ec33b003717 (diff)
parent236efe36be6d1c544f9477f10fdf38a17cd7a869 (diff)
downloadu-boot-imx-632093b566569329bc6e5b0893bdca01de905314.zip
u-boot-imx-632093b566569329bc6e5b0893bdca01de905314.tar.gz
u-boot-imx-632093b566569329bc6e5b0893bdca01de905314.tar.bz2
Merge git://git.denx.de/u-boot-x86
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/global_data.h3
-rw-r--r--include/asm-generic/u-boot.h4
-rw-r--r--include/common.h43
-rw-r--r--include/configs/bayleybay.h3
-rw-r--r--include/configs/minnowmax.h7
-rw-r--r--include/fdtdec.h2
-rw-r--r--include/pci.h43
-rw-r--r--include/pci_ids.h5
8 files changed, 103 insertions, 7 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 2155265..cc369fc 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -99,7 +99,8 @@ typedef struct global_data {
int pcidelay_done;
#endif
struct udevice *cur_serial_dev; /* current serial device */
- struct arch_global_data arch; /* architecture-specific data */
+ /* arch-specific data */
+ struct arch_global_data arch __attribute__((aligned(16)));
} gd_t;
#endif
diff --git a/include/asm-generic/u-boot.h b/include/asm-generic/u-boot.h
index c918049..9f3351d 100644
--- a/include/asm-generic/u-boot.h
+++ b/include/asm-generic/u-boot.h
@@ -130,8 +130,8 @@ typedef struct bd_info {
ulong bi_boot_params; /* where this board expects params */
#ifdef CONFIG_NR_DRAM_BANKS
struct { /* RAM configuration */
- ulong start;
- ulong size;
+ phys_addr_t start;
+ phys_size_t size;
} bi_dram[CONFIG_NR_DRAM_BANKS];
#endif /* CONFIG_NR_DRAM_BANKS */
} bd_t;
diff --git a/include/common.h b/include/common.h
index 5c076d6..c48e5bc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -217,6 +217,49 @@ extern char console_buffer[];
/* arch/$(ARCH)/lib/board.c */
void board_init_f(ulong);
void board_init_r(gd_t *, ulong) __attribute__ ((noreturn));
+
+/**
+ * board_init_f_mem() - Allocate global data and set stack position
+ *
+ * This function is called by each architecture very early in the start-up
+ * code to set up the environment for board_init_f(). It allocates space for
+ * global_data (see include/asm-generic/global_data.h) and places the stack
+ * below this.
+ *
+ * This function requires a stack[1] Normally this is at @top. The function
+ * starts allocating space from 64 bytes below @top. First it creates space
+ * for global_data. Then it calls arch_setup_gd() which sets gd to point to
+ * the global_data space and can reserve additional bytes of space if
+ * required). Finally it allocates early malloc() memory
+ * (CONFIG_SYS_MALLOC_F_LEN). The new top of the stack is just below this,
+ * and it returned by this function.
+ *
+ * [1] Strictly speaking it would be possible to implement this function
+ * in C on many archs such that it does not require a stack. However this
+ * does not seem hugely important as only 64 byte are wasted. The 64 bytes
+ * are used to handle the calling standard which generally requires pushing
+ * addresses or registers onto the stack. We should be able to get away with
+ * less if this becomes important.
+ *
+ * @top: Top of available memory, also normally the top of the stack
+ * @return: New stack location
+ */
+ulong board_init_f_mem(ulong top);
+
+/**
+ * arch_setup_gd() - Set up the global_data pointer
+ *
+ * This pointer is special in some architectures and cannot easily be assigned
+ * to. For example on x86 it is implemented by adding a specific record to its
+ * Global Descriptor Table! So we we provide a function to carry out this task.
+ * For most architectures this can simply be:
+ *
+ * gd = gd_ptr;
+ *
+ * @gd_ptr: Pointer to global data
+ */
+void arch_setup_gd(gd_t *gd_ptr);
+
int checkboard(void);
int show_board_info(void);
int checkflash(void);
diff --git a/include/configs/bayleybay.h b/include/configs/bayleybay.h
index ecda4ba..c590f56 100644
--- a/include/configs/bayleybay.h
+++ b/include/configs/bayleybay.h
@@ -26,7 +26,8 @@
"stderr=serial,vga\0"
#define CONFIG_SCSI_DEV_LIST \
- {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA}
+ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA}, \
+ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA_ALT}
#define CONFIG_MMC
#define CONFIG_SDHCI
diff --git a/include/configs/minnowmax.h b/include/configs/minnowmax.h
index 2a40d1f..aeb04b9 100644
--- a/include/configs/minnowmax.h
+++ b/include/configs/minnowmax.h
@@ -15,6 +15,7 @@
#define CONFIG_SYS_MONITOR_LEN (1 << 20)
#define CONFIG_ARCH_EARLY_INIT_R
+#define CONFIG_ARCH_MISC_INIT
#define CONFIG_SMSC_LPC47M
@@ -26,8 +27,10 @@
"stdout=vga,serial\0" \
"stderr=vga,serial\0"
-#define CONFIG_SCSI_DEV_LIST \
- {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA}
+#define CONFIG_SCSI_DEV_LIST \
+ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA}, \
+ {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA_ALT}
+
#define CONFIG_SPI_FLASH_STMICRO
#define CONFIG_MMC
diff --git a/include/fdtdec.h b/include/fdtdec.h
index eac679e..62acbd0 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -182,6 +182,8 @@ enum fdt_compat_id {
COMPAT_INTEL_PCH, /* Intel PCH */
COMPAT_INTEL_IRQ_ROUTER, /* Intel Interrupt Router */
COMPAT_ALTERA_SOCFPGA_DWMAC, /* SoCFPGA Ethernet controller */
+ COMPAT_INTEL_BAYTRAIL_FSP, /* Intel Bay Trail FSP */
+ COMPAT_INTEL_BAYTRAIL_FSP_MDP, /* Intel FSP memory-down params */
COMPAT_COUNT,
};
diff --git a/include/pci.h b/include/pci.h
index 628ede0..488ff44 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -910,6 +910,31 @@ int pci_bus_find_devfn(struct udevice *bus, pci_dev_t find_devfn,
struct udevice **devp);
/**
+ * pci_find_first_device() - return the first available PCI device
+ *
+ * This function and pci_find_first_device() allow iteration through all
+ * available PCI devices on all buses. Assuming there are any, this will
+ * return the first one.
+ *
+ * @devp: Set to the first available device, or NULL if no more are left
+ * or we got an error
+ * @return 0 if all is OK, -ve on error (e.g. a bus/bridge failed to probe)
+ */
+int pci_find_first_device(struct udevice **devp);
+
+/**
+ * pci_find_next_device() - return the next available PCI device
+ *
+ * Finds the next available PCI device after the one supplied, or sets @devp
+ * to NULL if there are no more.
+ *
+ * @devp: On entry, the last device returned. Set to the next available
+ * device, or NULL if no more are left or we got an error
+ * @return 0 if all is OK, -ve on error (e.g. a bus/bridge failed to probe)
+ */
+int pci_find_next_device(struct udevice **devp);
+
+/**
* pci_get_ff() - Returns a mask for the given access size
*
* @size: Access size
@@ -988,6 +1013,24 @@ int pci_bus_read_config(struct udevice *bus, pci_dev_t bdf, int offset,
int pci_bus_write_config(struct udevice *bus, pci_dev_t bdf, int offset,
unsigned long value, enum pci_size_t size);
+/**
+ * Driver model PCI config access functions. Use these in preference to others
+ * when you have a valid device
+ */
+int dm_pci_read_config(struct udevice *dev, int offset, unsigned long *valuep,
+ enum pci_size_t size);
+
+int dm_pci_read_config8(struct udevice *dev, int offset, u8 *valuep);
+int dm_pci_read_config16(struct udevice *dev, int offset, u16 *valuep);
+int dm_pci_read_config32(struct udevice *dev, int offset, u32 *valuep);
+
+int dm_pci_write_config(struct udevice *dev, int offset, unsigned long value,
+ enum pci_size_t size);
+
+int dm_pci_write_config8(struct udevice *dev, int offset, u8 value);
+int dm_pci_write_config16(struct udevice *dev, int offset, u16 value);
+int dm_pci_write_config32(struct udevice *dev, int offset, u32 value);
+
/*
* The following functions provide access to the above without needing the
* size parameter. We are trying to encourage the use of the 8/16/32-style
diff --git a/include/pci_ids.h b/include/pci_ids.h
index 5771e12..49f7d7d 100644
--- a/include/pci_ids.h
+++ b/include/pci_ids.h
@@ -2602,7 +2602,10 @@
#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_SDIO 0x0f15
#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_SDCARD 0x0f16
#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_LPC 0x0f1c
-#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA 0x0f23
+#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_IDE 0x0f20
+#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_IDE_ALT 0x0f21
+#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA 0x0f22
+#define PCI_DEVICE_ID_INTEL_VALLEYVIEW_SATA_ALT 0x0f23
#define PCI_DEVICE_ID_INTEL_82541ER 0x1078
#define PCI_DEVICE_ID_INTEL_82541GI_LF 0x107c
#define PCI_DEVICE_ID_INTEL_82542 0x1000