summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/am65x_evm.h3
-rw-r--r--include/configs/omapl138_lcdk.h39
-rw-r--r--include/configs/ti_armv7_common.h8
-rw-r--r--include/efi_api.h24
-rw-r--r--include/efi_loader.h16
-rw-r--r--include/linux/mtd/spi-nor.h4
-rw-r--r--include/spi.h20
-rw-r--r--include/usb.h11
8 files changed, 60 insertions, 65 deletions
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 6072e4a48c..0249a20ba8 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -94,11 +94,14 @@
"done;\0" \
"get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
"${bootdir}/${name_kern}\0" \
+ "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
+ "${bootdir}/${name_fit}\0" \
"partitions=" PARTS_DEFAULT
/* Incorporate settings into the U-Boot environment */
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_MMC_TI_ARGS \
+ DEFAULT_FIT_TI_ARGS \
EXTRA_ENV_AM65X_BOARD_SETTINGS \
EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index cab402a484..1c41e7e97a 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -13,8 +13,6 @@
/*
* Board
*/
-#undef CONFIG_USE_SPIFLASH
-#undef CONFIG_SYS_USE_NOR
/*
* SoC Configuration
@@ -104,21 +102,10 @@
* Serial Driver info
*/
#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
-#if !defined(CONFIG_DM_SERIAL)
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE -4 /* NS16550 register size */
-#define CONFIG_SYS_NS16550_COM1 DAVINCI_UART2_BASE /* Base address of UART2 */
-#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
-#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
-#endif
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
-#ifdef CONFIG_USE_SPIFLASH
-#define CONFIG_SYS_SPI_U_BOOT_SIZE 0x30000
-#endif
-
/*
* I2C Configuration
*/
@@ -168,24 +155,6 @@
#define CONFIG_SPL_NAND_LOAD
#endif
-#ifdef CONFIG_SYS_USE_NOR
-#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of flash banks */
-#define CONFIG_SYS_FLASH_SECT_SZ (128 << 10) /* 128KB */
-#define CONFIG_ENV_OFFSET (CONFIG_SYS_FLASH_SECT_SZ * 3)
-#define CONFIG_ENV_SIZE (128 << 10)
-#define CONFIG_SYS_FLASH_BASE DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
-#define PHYS_FLASH_SIZE (8 << 20) /* Flash size 8MB */
-#define CONFIG_SYS_MAX_FLASH_SECT ((PHYS_FLASH_SIZE/CONFIG_SYS_FLASH_SECT_SZ)\
- + 3)
-#define CONFIG_ENV_SECT_SIZE CONFIG_SYS_FLASH_SECT_SZ
-#endif
-
-#ifdef CONFIG_USE_SPIFLASH
-#define CONFIG_ENV_SIZE (64 << 10)
-#define CONFIG_ENV_OFFSET (256 << 10)
-#define CONFIG_ENV_SECT_SIZE (64 << 10)
-#endif
-
/*
* Network & Ethernet Configuration
*/
@@ -244,12 +213,6 @@
#define CONFIG_CLOCKS
#endif
-#if !defined(CONFIG_NAND) && \
- !defined(CONFIG_SYS_USE_NOR) && \
- !defined(CONFIG_USE_SPIFLASH)
-#define CONFIG_ENV_SIZE (16 << 10)
-#endif
-
/* SD/MMC */
#ifdef CONFIG_ENV_IS_IN_MMC
@@ -259,7 +222,6 @@
#define CONFIG_ENV_OFFSET (51 << 9) /* Sector 51 */
#endif
-#ifndef CONFIG_DIRECT_NOR_BOOT
/* defines for SPL */
#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SYS_TEXT_BASE - \
CONFIG_SYS_MALLOC_LEN)
@@ -267,7 +229,6 @@
#define CONFIG_SPL_STACK 0x8001ff00
#define CONFIG_SPL_MAX_FOOTPRINT 32768
#define CONFIG_SPL_PAD_TO 32768
-#endif
/* additions for new relocation code, must added to all boards */
#define CONFIG_SYS_SDRAM_BASE 0xc0000000
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 2058f8de0f..2de6bc2390 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -55,7 +55,13 @@
"addr_fit=0x90000000\0" \
"name_fit=fitImage\0" \
"update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}\0" \
- "loadfit=run args_mmc; bootm ${loadaddr}#${fdtfile};\0" \
+ "get_overlaystring=" \
+ "for overlay in $overlay_files;" \
+ "do;" \
+ "setenv overlaystring ${overlaystring}'#'${overlay};" \
+ "done;\0" \
+ "run_fit=bootm ${loadaddr}#${fdtfile}${overlaystring}\0" \
+ "loadfit=run args_mmc; run run_fit;\0" \
/*
* DDR information. If the CONFIG_NR_DRAM_BANKS is not defined,
diff --git a/include/efi_api.h b/include/efi_api.h
index cb895f31e5..37e56da460 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -1461,6 +1461,12 @@ struct efi_pxe_base_code_protocol {
#define EFI_FILE_PROTOCOL_REVISION2 0x00020000
#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
+struct efi_file_io_token {
+ struct efi_event *event;
+ efi_status_t status;
+ efi_uintn_t buffer_size;
+ void *buffer;};
+
struct efi_file_handle {
u64 rev;
efi_status_t (EFIAPI *open)(struct efi_file_handle *file,
@@ -1483,10 +1489,16 @@ struct efi_file_handle {
const efi_guid_t *info_type, efi_uintn_t buffer_size,
void *buffer);
efi_status_t (EFIAPI *flush)(struct efi_file_handle *file);
- /*
- * TODO: We currently only support EFI file protocol revision 0x00010000
- * while UEFI specs 2.4 - 2.7 prescribe revision 0x00020000.
- */
+ efi_status_t (EFIAPI *open_ex)(struct efi_file_handle *file,
+ struct efi_file_handle **new_handle,
+ u16 *file_name, u64 open_mode, u64 attributes,
+ struct efi_file_io_token *token);
+ efi_status_t (EFIAPI *read_ex)(struct efi_file_handle *file,
+ struct efi_file_io_token *token);
+ efi_status_t (EFIAPI *write_ex)(struct efi_file_handle *file,
+ struct efi_file_io_token *token);
+ efi_status_t (EFIAPI *flush_ex)(struct efi_file_handle *file,
+ struct efi_file_io_token *token);
};
#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION 0x00010000
@@ -1505,6 +1517,10 @@ struct efi_simple_file_system_protocol {
EFI_GUID(0x09576e93, 0x6d3f, 0x11d2, \
0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_ID \
+ EFI_GUID(0xdb47d7d3, 0xfe81, 0x11d3, \
+ 0x9a, 0x35, 0x00, 0x90, 0x27, 0x3f, 0xC1, 0x4d)
+
#define EFI_FILE_MODE_READ 0x0000000000000001
#define EFI_FILE_MODE_WRITE 0x0000000000000002
#define EFI_FILE_MODE_CREATE 0x8000000000000000
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 00eba8afa4..dd24a2746c 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -555,22 +555,6 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
(((_dp)->type == DEVICE_PATH_TYPE_##_type) && \
((_dp)->sub_type == DEVICE_PATH_SUB_TYPE_##_subtype))
-/**
- * ascii2unicode() - convert ASCII string to UTF-16 string
- *
- * A zero terminated ASCII string is converted to a zero terminated UTF-16
- * string. The output buffer must be preassigned.
- *
- * @unicode: preassigned output buffer for UTF-16 string
- * @ascii: ASCII string to be converted
- */
-static inline void ascii2unicode(u16 *unicode, const char *ascii)
-{
- while (*ascii)
- *(unicode++) = *(ascii++);
- *unicode = 0;
-}
-
static inline int guidcmp(const void *g1, const void *g2)
{
return memcmp(g1, g2, sizeof(efi_guid_t));
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index 88e80af579..709b49d393 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -91,6 +91,10 @@
#define SPINOR_OP_WRDI 0x04 /* Write disable */
#define SPINOR_OP_AAI_WP 0xad /* Auto address increment word program */
+/* Used for SST26* flashes only. */
+#define SPINOR_OP_READ_BPR 0x72 /* Read block protection register */
+#define SPINOR_OP_WRITE_BPR 0x42 /* Write block protection register */
+
/* Used for S3AN flashes only */
#define SPINOR_OP_XSE 0x50 /* Sector erase */
#define SPINOR_OP_XPP 0x82 /* Page program */
diff --git a/include/spi.h b/include/spi.h
index 378594163b..5eec0c4775 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -248,6 +248,26 @@ int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen);
int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
void *din, unsigned long flags);
+/**
+ * spi_write_then_read - SPI synchronous write followed by read
+ *
+ * This performs a half duplex transaction in which the first transaction
+ * is to send the opcode and if the length of buf is non-zero then it start
+ * the second transaction as tx or rx based on the need from respective slave.
+ *
+ * @slave: The SPI slave device with which opcode/data will be exchanged
+ * @opcode: opcode used for specific transfer
+ * @n_opcode: size of opcode, in bytes
+ * @txbuf: buffer into which data to be written
+ * @rxbuf: buffer into which data will be read
+ * @n_buf: size of buf (whether it's [tx|rx]buf), in bytes
+ *
+ * Returns: 0 on success, not 0 on failure
+ */
+int spi_write_then_read(struct spi_slave *slave, const u8 *opcode,
+ size_t n_opcode, const u8 *txbuf, u8 *rxbuf,
+ size_t n_buf);
+
/* Copy memory mapped data */
void spi_flash_copy_mmap(void *data, void *offset, size_t len);
diff --git a/include/usb.h b/include/usb.h
index 420a30e49f..bcad552f85 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -184,7 +184,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int transfer_len, struct devrequest *setup);
int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
- int transfer_len, int interval);
+ int transfer_len, int interval, bool nonblock);
#if defined CONFIG_USB_EHCI_HCD || defined CONFIG_USB_MUSB_HOST \
|| CONFIG_IS_ENABLED(DM_USB)
@@ -261,8 +261,8 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe,
void *data, unsigned short size, int timeout);
int usb_bulk_msg(struct usb_device *dev, unsigned int pipe,
void *data, int len, int *actual_length, int timeout);
-int usb_submit_int_msg(struct usb_device *dev, unsigned long pipe,
- void *buffer, int transfer_len, int interval);
+int usb_int_msg(struct usb_device *dev, unsigned long pipe,
+ void *buffer, int transfer_len, int interval, bool nonblock);
int usb_disable_asynch(int disable);
int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
int usb_get_configuration_no(struct usb_device *dev, int cfgno,
@@ -708,7 +708,7 @@ struct dm_usb_ops {
*/
int (*interrupt)(struct udevice *bus, struct usb_device *udev,
unsigned long pipe, void *buffer, int length,
- int interval);
+ int interval, bool nonblock);
/**
* create_int_queue() - Create and queue interrupt packets
@@ -1029,7 +1029,8 @@ int usb_emul_bulk(struct udevice *emul, struct usb_device *udev,
* @return 0 if OK, -ve on error
*/
int usb_emul_int(struct udevice *emul, struct usb_device *udev,
- unsigned long pipe, void *buffer, int length, int interval);
+ unsigned long pipe, void *buffer, int length, int interval,
+ bool nonblock);
/**
* usb_emul_find() - Find an emulator for a particular device