mtd/st_smi: Clear error flags while initiating a fresh write
Subsystems (10)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/19 mtd/st_smi: Clear error flags while initiating a fresh write
SMI controller reports an error when the code tries to write on the flash area with Write Enable command not issued or the bank has come out of the write mode.
This error is reported even with a fresh write once the ERF1 or ERF2 is set. Clear these flags while initiating a fresh write
--- drivers/mtd/st_smi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/mtd/st_smi.c +2 -0
@@ -392,6 +392,8 @@ static int smi_write(unsigned int *src_addr, unsigned int *dst_addr,return -1 ; } +writel (readl (&smicntl->smi_sr) & ~(ERF1 |ERF2 ), &smicntl->smi_sr); +if (smi_wait_till_ready (banknum,CONFIG_SYS_FLASH_WRITE_TOUT ))return -EBUSY ;
Signature · 1 line
1.7.11.4
PATCH 2/19 mtd/st_smi: Add support for Micron N25Q128 Flash
From: Armando Visconti <[email protected]>
--- drivers/mtd/st_smi.c | 1 + 1 file changed, 1 insertion(+)
drivers/mtd/st_smi.c +1 -0
@@ -75,6 +75,7 @@ static struct flash_device flash_devices[] = {FLASH_ID ("st m45pe20" ,0xd8 ,0x00124020 ,0x100 ,0x10000 ,0x40000 ),FLASH_ID ("st m45pe40" ,0xd8 ,0x00134020 ,0x100 ,0x10000 ,0x80000 ),FLASH_ID ("st m45pe80" ,0xd8 ,0x00144020 ,0x100 ,0x10000 ,0x100000 ), +FLASH_ID ("mcr n25q128" ,0xd8 ,0x0018BA20 ,0x100 ,0x10000 ,0x1000000 ),FLASH_ID ("sp s25fl004" ,0xd8 ,0x00120201 ,0x100 ,0x10000 ,0x80000 ),FLASH_ID ("sp s25fl008" ,0xd8 ,0x00130201 ,0x100 ,0x10000 ,0x100000 ), FLASH_ID("sp s25fl016" , 0xd8, 0x00140201, 0x100, 0x10000, 0x200000),
Signature · 1 line
1.7.11.4
PATCH 3/19 mtd/st_smi: Avoid issuing multiple WE commands
In reply to Vipin KumarAt the start of an smi_write, if the destination address is page aligned, the Write Enable command is getting issued twice. This patch fixes it by keeping a flag.
--- drivers/mtd/st_smi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/mtd/st_smi.c +5 -8
@@ -374,7 +374,7 @@ static int smi_write(unsigned int *src_addr, unsigned int *dst_addr,u8 *src_addr8 = (u8 *)src_addr;u8 *dst_addr8 = (u8 *)dst_addr;int banknum; -int i; +int i, issue_we;switch (bank_addr) {case SMIBANK0_BASE :
@@ -394,19 +394,16 @@ static int smi_write(unsigned int *src_addr, unsigned int *dst_addr, }writel (readl (&smicntl->smi_sr) & ~(ERF1 |ERF2 ), &smicntl->smi_sr); - -if (smi_wait_till_ready (banknum,CONFIG_SYS_FLASH_WRITE_TOUT )) -return -EBUSY ; + issue_we =1 ;/* Set SMI in Hardware Mode */ writel (readl (&smicntl->smi_cr1) & ~SW_MODE , &smicntl->smi_cr1); -if (smi_write_enable (banknum)) -return -EIO ; -/* Perform the write command */ for (i =0 ; i < length; i +=4 ) { -if (((ulong) (dst_addr) %SFLASH_PAGE_SIZE ) ==0 ) { +if (issue_we || (((ulong)(dst_addr) %SFLASH_PAGE_SIZE ) ==0 )) { + issue_we =0 ; +if (smi_wait_till_ready (banknum,CONFIG_SYS_FLASH_WRITE_TOUT ))return -EBUSY ;
Signature · 1 line
1.7.11.4
PATCH 4/19 mtd/st_smi: Write to flash in a tight loop
In reply to Vipin KumarThe write loop is checking for dest_addr alignment with page size. This sometimes leads to smi controller coming out of write mode and eventually the next write failing with ERF1 being set.
To avoid this, write to flash in a tight loop and write bytewise to also support not word aligned data bytes to be written. Additionally, enable burst mode before this loop so that the controller does not deselect the chip if the transfer is finished.
--- drivers/mtd/st_smi.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-)
drivers/mtd/st_smi.c +13 -17
@@ -368,13 +368,11 @@ static int smi_sector_erase(flash_info_t *info, unsigned int sector)* * Write to SMI flash */ -static int smi_write (unsigned int *src_addr,unsigned int *dst_addr, +static int smi_write (unsigned char *src_addr,unsigned char *dst_addr,unsigned int length,ulong bank_addr) { -u8 *src_addr8 = (u8 *)src_addr; -u8 *dst_addr8 = (u8 *)dst_addr;int banknum; -int i, issue_we; +int issue_we;switch (bank_addr) {case SMIBANK0_BASE :
@@ -400,7 +398,10 @@ static int smi_write(unsigned int *src_addr, unsigned int *dst_addr,writel (readl (&smicntl->smi_cr1) & ~SW_MODE , &smicntl->smi_cr1);/* Perform the write command */ -for (i =0 ; i < length; i +=4 ) { +while (length) { +int k; +unsigned int wlen =min (SFLASH_PAGE_SIZE , length); +if (issue_we || (((ulong)(dst_addr) %SFLASH_PAGE_SIZE ) ==0 )) { issue_we =0 ;
@@ -412,19 +413,14 @@ static int smi_write(unsigned int *src_addr, unsigned int *dst_addr,return -EIO ; } -if (length <4 ) { -int k; +writel (readl (&smicntl->smi_cr1) |WB_MODE , &smicntl->smi_cr1); -/* -* Handle special case, where length < 4 (redundant env) -*/ -for (k =0 ; k < length; k++) - *dst_addr8++ = *src_addr8++; - }else { -/* Normal 32bit write */ +for (k =0 ; k < wlen; k++) *dst_addr++ = *src_addr++; - } +writel (readl (&smicntl->smi_cr1) & ~WB_MODE , &smicntl->smi_cr1); + + length -= wlen;if ((readl (&smicntl->smi_sr) & (ERF1 |ERF2 )))return -EIO ; }
@@ -448,8 +444,8 @@ static int smi_write(unsigned int *src_addr, unsigned int *dst_addr,*/ int write_buff (flash_info_t *info,uchar *src,ulong dest_addr,ulong length) { -return smi_write ((unsigned int *)src, (unsigned int *)dest_addr, - length, info->start[0 ]); +return smi_write (src, (unsigned char *)dest_addr, length, + info->start[0 ]); }/*
Signature · 1 line
1.7.11.4
PATCH 5/19 mtd/st_smi: Use page sizes respective to flash
In reply to Vipin KumarThe page size is a flash dependent property and the driver was using a macro in place of page size. This patch uses the proper page size wrt the flash device connected on board
--- drivers/mtd/st_smi.c | 41 +++++++++++++++++++++++++++++++++-------- include/linux/mtd/st_smi.h | 1 - 2 files changed, 33 insertions(+), 9 deletions(-)
drivers/mtd/st_smi.c +33 -8
@@ -96,6 +96,25 @@ static struct flash_device flash_devices[] = { };/* +* get_flash_device - Return flash_device pointer for a particular device id +* @id: Device id +* +* Return flash_device pointer for a particular device id +*/ +static struct flash_device *get_flash_device (u32 id) +{ +struct flash_device *flash_dev_p = &flash_devices[0 ]; +int i; + +for (i =0 ; i <ARRAY_SIZE (flash_devices); i++, flash_dev_p++) { +if (flash_dev_p->device_id == id) +return flash_dev_p; + } + +return NULL ; +} + +/* * smi_wait_xfer_finish - Wait until TFF is set in status register * @timeout: timeout in milliseconds *
@@ -361,20 +380,27 @@ static int smi_sector_erase(flash_info_t *info, unsigned int sector)/* * smi_write - Write to SMI flash +* @info: flash info structure * @src_addr: source buffer * @dst_addr: destination buffer * @length: length to write in bytes -* @bank: bank base address * * Write to SMI flash */ -static int smi_write (unsigned char *src_addr,unsigned char *dst_addr, -unsigned int length,ulong bank_addr) +static int smi_write (flash_info_t *info,unsigned char *src_addr, +unsigned char *dst_addr,unsigned int length) { +struct flash_device *flash_device_p =get_flash_device (info->flash_id); +u32 page_size;int banknum;int issue_we; -switch (bank_addr) { +if (!flash_device_p) +return -EIO ; + + page_size = flash_device_p->pagesize; + +switch (info->start[0 ]) {case SMIBANK0_BASE : banknum =BANK0 ;break ;
@@ -400,9 +426,9 @@ static int smi_write(unsigned char *src_addr, unsigned char *dst_addr,/* Perform the write command */ while (length) {int k; -unsigned int wlen =min (SFLASH_PAGE_SIZE , length); +unsigned int wlen =min (page_size, length); -if (issue_we || (((ulong)(dst_addr) %SFLASH_PAGE_SIZE ) ==0 )) { +if (issue_we || (((ulong)(dst_addr) % page_size) ==0 )) { issue_we =0 ; if (smi_wait_till_ready(banknum,
@@ -444,8 +470,7 @@ static int smi_write(unsigned char *src_addr, unsigned char *dst_addr,*/ int write_buff (flash_info_t *info,uchar *src,ulong dest_addr,ulong length) { -return smi_write (src, (unsigned char *)dest_addr, length, - info->start[0 ]); +return smi_write (info, src, (unsigned char *)dest_addr, length); }/*
include/linux/mtd/st_smi.h +0 -1
@@ -108,7 +108,6 @@ struct flash_dev {ushort sector_count; }; -#define SFLASH_PAGE_SIZE 0x100/* flash page size */ #define XFER_FINISH_TOUT 15/* xfer finish timeout(in ms) */ #define WMODE_TOUT 15/* write enable timeout(in ms) */
Signature · 1 line
1.7.11.4
PATCH 6/19 usbh/ehci: Increase timeout for enumeration
In reply to Vipin KumarFew pen drives take longer than usual for enumeration. The u-boot unlike linux does not depend on interrupts and works in polling and timeout mode.
This patch increases this timeout to increase the set of usb sticks that can be enumerated by u-boot
--- common/usb_hub.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-)
common/usb_hub.c +22 -5
@@ -393,17 +393,34 @@ static int usb_hub_configure(struct usb_device *dev) "" : "no "); usb_hub_power_on(hub); +mdelay (1500 ); +for (i =0 ; i < dev->maxchild; i++) { ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);unsigned short portstatus, portchange; +int ret; +ulong start =get_timer (0 ); + +do { + ret =usb_get_port_status (dev, i +1 , portsts); +if (ret <0 ) { +USB_HUB_PRINTF ("get_port_status failed\n" ); +break ; + } + + portstatus =le16_to_cpu (portsts->wPortStatus); + portchange =le16_to_cpu (portsts->wPortChange); + +if ((portchange &USB_PORT_STAT_C_CONNECTION ) && + (portstatus &USB_PORT_STAT_CONNECTION )) +break ; -if (usb_get_port_status (dev, i +1 , portsts) <0 ) { -USB_HUB_PRINTF ("get_port_status failed\n" ); +mdelay (100 ); + }while (get_timer (start) <CONFIG_SYS_HZ *10 ); + +if (ret <0 )continue ; - } - portstatus =le16_to_cpu (portsts->wPortStatus); - portchange =le16_to_cpu (portsts->wPortChange);USB_HUB_PRINTF ("Port %d Status %X Change %X\n" , i +1 , portstatus, portchange);
Signature · 1 line
1.7.11.4
PATCH 7/19 sdhci: Add sdhci support for spear devices
In reply to Vipin Kumar--- drivers/mmc/Makefile | 1 + drivers/mmc/spear_sdhci.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 drivers/mmc/spear_sdhci.c
drivers/mmc/Makefile +1 -0
@@ -45,6 +45,7 @@ COBJS-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o COBJS-$(CONFIG_SDHCI) += sdhci.o COBJS-$(CONFIG_S5P_SDHCI) += s5p_sdhci.o COBJS-$(CONFIG_SH_MMCIF) += sh_mmcif.o +COBJS-$(CONFIG_SPEAR_SDHCI) += spear_sdhci.o COBJS-$(CONFIG_TEGRA_MMC) += tegra_mmc.o COBJS-$(CONFIG_DWMMC) += dw_mmc.o
drivers/mmc/spear_sdhci.c new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 8/19 net/designware: Do not select MIIPORT for RGMII interface
In reply to Vipin KumarDo not select MIIPORT for RGMII interface
--- drivers/net/designware.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/designware.c +3 -1
@@ -113,7 +113,9 @@ static int mac_reset(struct eth_device *dev)int timeout =CONFIG_MACRESET_TIMEOUT ;writel (DMAMAC_SRST , &dma_p->busmode); -writel (MII_PORTSELECT , &mac_p->conf); + +if (priv->interface !=PHY_INTERFACE_MODE_RGMII ) +writel (MII_PORTSELECT , &mac_p->conf); start =get_timer (0 );while (get_timer (start) < timeout) {
Signature · 1 line
1.7.11.4
PATCH 10/19 usb/gadget/designware_otg: Add support for designware otg
In reply to Vipin KumarFrom: Pratyush Anand <[email protected]>
Driver for designware otg device only implements device functionality and is meant to be used with usbtty interface. This driver will work mainly for Control and Bulk endpoints. Periodic transfer has not been verified using these drivers.
--- drivers/serial/usbtty.h | 2 + drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/designware_otg.c | 1063 +++++++++++++++++++++++++++++++++++ include/usb/designware_otg.h | 500 ++++++++++++++++ 4 files changed, 1566 insertions(+) create mode 100644 drivers/usb/gadget/designware_otg.c create mode 100644 include/usb/designware_otg.h
drivers/serial/usbtty.h +2 -0
@@ -35,6 +35,8 @@#include <usb/pxa27x_udc.h> #elif defined(CONFIG_DW_UDC )#include <usb/designware_udc.h> +#elif defined(CONFIG_DW_OTG ) +#include <usb/designware_otg.h> #endif #include <version.h>
drivers/usb/gadget/Makefile +1 -0
@@ -43,6 +43,7 @@ ifdef CONFIG_USB_DEVICE COBJS-y += core.o COBJS-y += ep0.o COBJS-$(CONFIG_DW_UDC) += designware_udc.o +COBJS-$(CONFIG_DW_OTG) += designware_otg.o COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
drivers/usb/gadget/designware_otg.c new file +1063 -0
1,063 lines not on this page · raw message
include/usb/designware_otg.h new file +500 -0
500 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 11/19 usb/host/ehci: Add support for EHCI on spear
In reply to Vipin KumarAdd EHCI support for spear boards
--- drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-spear.c | 59 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 drivers/usb/host/ehci-spear.c
drivers/usb/host/Makefile +1 -0
@@ -54,6 +54,7 @@ COBJS-$(CONFIG_USB_EHCI_PPC4XX) += ehci-ppc4xx.o COBJS-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o COBJS-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o COBJS-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o +COBJS-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o COBJS-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o COBJS-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
drivers/usb/host/ehci-spear.c new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 12/19 usbtty: adapt buffers for large packet support
In reply to Vipin KumarFrom: Shiraz Hashim <[email protected]>
Increase buffer sizes at driver and tty level to accommodate kermit large packet support.
--- drivers/serial/usbtty.c | 2 +- include/usbdevice.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/serial/usbtty.c +1 -1
@@ -63,7 +63,7 @@/* * Buffers to hold input and output data */ -#define USBTTY_BUFFER_SIZE 256 +#define USBTTY_BUFFER_SIZE 2048static circbuf_t usbtty_input;static circbuf_t usbtty_output;
include/usbdevice.h +3 -1
@@ -475,7 +475,9 @@ typedef struct urb_link {* function driver to inform it that data has arrived. */ -#define URB_BUF_SIZE 128/* in linux we'd malloc this, but in u-boot we prefer static data */ +/* in linux we'd malloc this, but in u-boot we prefer static data */ +#define URB_BUF_SIZE 512 +struct urb {struct usb_endpoint_instance *endpoint;
Signature · 1 line
1.7.11.4
PATCH 13/19 net/macb: Add arch specific routine to get mdio control
In reply to Vipin KumarFrom: Shiraz Hashim <[email protected]>
SPEAr310 and SPEAr320 Ethernet interfaces share same MDIO lines to control their respective phys. Currently their is a fixed configuration in which only a particular MAC can use the MDIO lines.
Call an arch specific function to take control of specific mdio lines at runtime.
--- drivers/net/macb.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/net/macb.c +10 -0
@@ -165,6 +165,13 @@ static u16 macb_mdio_read(struct macb_device *macb, u8 reg)return MACB_BFEXT (DATA , frame); } +static void __def_arch_get_mdio_control (const char *name) +{ +return ; +} +int arch_get_mdio_control (const char *name) + __attribute__((weak,alias ("__def_arch_get_mdio_control" ))); +#if defined(CONFIG_CMD_MII )int macb_miiphy_read (const char *devname,u8 phy_adr,u8 reg,u16 *value)
@@ -175,6 +182,7 @@ int macb_miiphy_read(const char *devname, u8 phy_adr, u8 reg, u16 *value)if ( macb->phy_addr != phy_adr )return -1 ; +arch_get_mdio_control (devname); *value =macb_mdio_read (macb, reg);return 0 ;
@@ -188,6 +196,7 @@ int macb_miiphy_write(const char *devname, u8 phy_adr, u8 reg, u16 value)if ( macb->phy_addr != phy_adr )return -1 ; +arch_get_mdio_control (devname);macb_mdio_write (macb, reg, value);return 0 ;
@@ -379,6 +388,7 @@ static int macb_phy_init(struct macb_device *macb)int media, speed, duplex;int i; +arch_get_mdio_control (netdev->name);#ifdef CONFIG_MACB_SEARCH_PHY /* Auto-detect phy_addr */ if (!macb_phy_find (macb)) {
Signature · 1 line
1.7.11.4
PATCH 14/19 net/macb: workaround for transmission hang issue
In reply to Vipin KumarFrom: Shiraz Hashim <[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.
--- drivers/net/macb.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-)
drivers/net/macb.c +34 -4
@@ -55,7 +55,7 @@#define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096#define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1#define CONFIG_SYS_MACB_TX_TIMEOUT 1000#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 5000000
@@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb->tx_ring[tx_head].ctrl = ctrl; macb->tx_ring[tx_head].addr = paddr;barrier (); -macb_writel (macb,NCR ,MACB_BIT (TE ) |MACB_BIT (RE ) |MACB_BIT (TSTART )); +/* +* Due to issues on SPEAr320 RMII, disable TE first so that +* controller can come out if it is hanged during transmission +*/ +macb_writel (macb,NCR ,macb_readl (macb,NCR ) & ~MACB_BIT (TE )); +macb_writel (macb,NCR ,macb_readl (macb,NCR ) | +MACB_BIT (TE ) |MACB_BIT (TSTART ));/* * I guess this is necessary because the networking core may
@@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw (struct macb_device *bp) +{ +/* Make sure we have the write buffer for ourselves */ +barrier (); +/* +* Disable RX and TX (XXX: Should we halt the transmission +* more gracefully?) and we should not close the mdio port +*/ +macb_writel (bp,NCR ,0 ); + +/* Clear the stats registers (XXX: Update stats first?) */ +macb_writel (bp,NCR ,MACB_BIT (CLRSTAT )); + +/* keep the mdio port , otherwise other eth will not work */ +macb_writel (bp,NCR ,MACB_BIT (MPE )); + +/* Clear all status flags */ +macb_writel (bp,TSR , ~0UL ); +macb_writel (bp,RSR , ~0UL ); + +/* Disable all interrupts */ +macb_writel (bp,IDR , ~0UL ); +macb_readl (bp,ISR ); +} +static int macb_init (struct eth_device *netdev,bd_t *bd) {struct macb_device *macb =to_macb (netdev);
@@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr =macb_readl (macb,TSR ); }while (tsr &MACB_BIT (TGO )); -/* Disable TX and RX, and clear statistics */ -macb_writel (macb,NCR ,MACB_BIT (CLRSTAT )); +macb_reset_hw (macb); }static int macb_write_hwaddr (struct eth_device *dev)
Signature · 1 line
1.7.11.4
PATCH 14/19 net/macb: workaround for transmission hang issue
Hi Vipin,
Quoted 81 lines · Vipin Kumar
From: Shiraz Hashim <[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.
Signed-off-by Shiraz Hashim <[email protected]>--- drivers/net/macb.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-)drivers/net/macb.c +33
-2@@ -55,7 +55,7 @@#define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096#define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1#define CONFIG_SYS_MACB_TX_TIMEOUT 1000#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 5000000@@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb->tx_ring[tx_head].ctrl = ctrl; macb->tx_ring[tx_head].addr = paddr;barrier (); -macb_writel (macb,NCR ,MACB_BIT (TE ) |MACB_BIT (RE ) |MACB_BIT (TSTART )); +/* +* Due to issues on SPEAr320 RMII, disable TE first so that +* controller can come out if it is hanged during transmission +*/ +macb_writel (macb,NCR ,macb_readl (macb,NCR ) & ~MACB_BIT (TE )); +macb_writel (macb,NCR ,macb_readl (macb,NCR ) | +MACB_BIT (TE ) |MACB_BIT (TSTART ));/* * I guess this is necessary because the networking core may @@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw (struct macb_device *bp) +{ +/* Make sure we have the write buffer for ourselves */ +barrier (); +/* +* Disable RX and TX (XXX: Should we halt the transmission +* more gracefully?) and we should not close the mdio port +*/ +macb_writel (bp,NCR ,0 ); + +/* Clear the stats registers (XXX: Update stats first?) */ +macb_writel (bp,NCR ,MACB_BIT (CLRSTAT )); + +/* keep the mdio port , otherwise other eth will not work */ +macb_writel (bp,NCR ,MACB_BIT (MPE )); + +/* Clear all status flags */ +macb_writel (bp,TSR , ~0UL ); +macb_writel (bp,RSR , ~0UL ); + +/* Disable all interrupts */ +macb_writel (bp,IDR , ~0UL ); +macb_readl (bp,ISR ); +} +static int macb_init (struct eth_device *netdev,bd_t *bd) {struct macb_device *macb =to_macb (netdev);
drivers/net/macb.c static void macb_halt(struct eth_device *netdev) · line 557
Quoted 9 lines
drivers/net/macb.c +1
-2@@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr =macb_readl (macb,TSR ); }while (tsr &MACB_BIT (TGO )); -/* Disable TX and RX, and clear statistics */ -macb_writel (macb,NCR ,MACB_BIT (CLRSTAT )); +macb_reset_hw (macb); }static int macb_write_hwaddr (struct eth_device *dev)
This patch did not reappear in later versions of the series, and no other standalone patch seems to match it. Was it dropped?
Amicalement,
Signature · 1 line
Albert.
PATCH 14/19 net/macb: workaround for transmission hang issue
Quoted 94 lines · Albert ARIBAUD
Hi Vipin,
Quoted 89 lines · Vipin Kumar
From: Shiraz Hashim <[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.
Signed-off-by Shiraz Hashim <[email protected]>--- drivers/net/macb.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-)drivers/net/macb.c +34
-4@@ -55,7 +55,7 @@#define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096#define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1#define CONFIG_SYS_MACB_TX_TIMEOUT 1000#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 5000000@@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb->tx_ring[tx_head].ctrl = ctrl; macb->tx_ring[tx_head].addr = paddr;barrier (); -macb_writel (macb,NCR ,MACB_BIT (TE ) |MACB_BIT (RE ) |MACB_BIT (TSTART )); +/* +* Due to issues on SPEAr320 RMII, disable TE first so that +* controller can come out if it is hanged during transmission +*/ +macb_writel (macb,NCR ,macb_readl (macb,NCR ) & ~MACB_BIT (TE )); +macb_writel (macb,NCR ,macb_readl (macb,NCR ) | +MACB_BIT (TE ) |MACB_BIT (TSTART ));/* * I guess this is necessary because the networking core may @@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw (struct macb_device *bp) +{ +/* Make sure we have the write buffer for ourselves */ +barrier (); +/* +* Disable RX and TX (XXX: Should we halt the transmission +* more gracefully?) and we should not close the mdio port +*/ +macb_writel (bp,NCR ,0 ); + +/* Clear the stats registers (XXX: Update stats first?) */ +macb_writel (bp,NCR ,MACB_BIT (CLRSTAT )); + +/* keep the mdio port , otherwise other eth will not work */ +macb_writel (bp,NCR ,MACB_BIT (MPE )); + +/* Clear all status flags */ +macb_writel (bp,TSR , ~0UL ); +macb_writel (bp,RSR , ~0UL ); + +/* Disable all interrupts */ +macb_writel (bp,IDR , ~0UL ); +macb_readl (bp,ISR ); +} +static int macb_init (struct eth_device *netdev,bd_t *bd) {struct macb_device *macb =to_macb (netdev);@@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr =macb_readl (macb,TSR ); }while (tsr &MACB_BIT (TGO )); -/* Disable TX and RX, and clear statistics */ -macb_writel (macb,NCR ,MACB_BIT (CLRSTAT )); +macb_reset_hw (macb); }
Quoted 4 lines
drivers/net/macb.c static void macb_halt(struct eth_device *netdev) · line 557
Quoted 1 line
drivers/net/macb.c +0
-0static int macb_write_hwaddr (struct eth_device *dev)This patch did not reappear in later versions of the series, and no other standalone patch seems to match it. Was it dropped?
Ping?
Amicalement,
Signature · 1 line
Albert.
PATCH 14/19 net/macb: workaround for transmission hang issue
Hi All,
Quoted 23 lines · Albert ARIBAUD
Quoted 20 lines · Albert ARIBAUD
Hi Vipin,
Quoted 15 lines · Vipin Kumar
From: Shiraz Hashim<[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by Shiraz Hashim<[email protected]>--- drivers/net/macb.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-)
Tested on Atmel EK board. It works.
BTW, would this be implemented as a workaround only for SPEAr320S?
Best Regards,
Bo Shen
Quoted 77 lines
Quoted 69 lines
Quoted 69 lines
drivers/net/macb.c +34
-4@@ -55,7 +55,7 @@#define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096#define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1#define CONFIG_SYS_MACB_TX_TIMEOUT 1000#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 5000000@@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb->tx_ring[tx_head].ctrl = ctrl; macb->tx_ring[tx_head].addr = paddr;barrier (); -macb_writel (macb,NCR ,MACB_BIT (TE ) |MACB_BIT (RE ) |MACB_BIT (TSTART )); +/* +* Due to issues on SPEAr320 RMII, disable TE first so that +* controller can come out if it is hanged during transmission +*/ +macb_writel (macb,NCR ,macb_readl (macb,NCR )& ~MACB_BIT (TE )); +macb_writel (macb,NCR ,macb_readl (macb,NCR ) | +MACB_BIT (TE ) |MACB_BIT (TSTART ));/* * I guess this is necessary because the networking core may @@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw (struct macb_device *bp) +{ +/* Make sure we have the write buffer for ourselves */ +barrier (); +/* +* Disable RX and TX (XXX: Should we halt the transmission +* more gracefully?) and we should not close the mdio port +*/ +macb_writel (bp,NCR ,0 ); + +/* Clear the stats registers (XXX: Update stats first?) */ +macb_writel (bp,NCR ,MACB_BIT (CLRSTAT )); + +/* keep the mdio port , otherwise other eth will not work */ +macb_writel (bp,NCR ,MACB_BIT (MPE )); + +/* Clear all status flags */ +macb_writel (bp,TSR , ~0UL ); +macb_writel (bp,RSR , ~0UL ); + +/* Disable all interrupts */ +macb_writel (bp,IDR , ~0UL ); +macb_readl (bp,ISR ); +} +static int macb_init (struct eth_device *netdev,bd_t *bd) {struct macb_device *macb =to_macb (netdev);@@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr =macb_readl (macb,TSR ); }while (tsr&MACB_BIT (TGO )); -/* Disable TX and RX, and clear statistics */ -macb_writel (macb,NCR ,MACB_BIT (CLRSTAT )); +macb_reset_hw (macb); }Quoted 4 lines
drivers/net/macb.c static void macb_halt(struct eth_device *netdev) · line 557
Quoted 1 line
drivers/net/macb.c +0
-0static int macb_write_hwaddr (struct eth_device *dev)This patch did not reappear in later versions of the series, and no other standalone patch seems to match it. Was it dropped?
Ping?
Amicalement,
PATCH 14/19 net/macb: workaround for transmission hang issue
Quoted 33 lines · Bo Shen
Hi All,
Quoted 25 lines · Albert ARIBAUD
Quoted 22 lines · Albert ARIBAUD
Hi Vipin,
Quoted 17 lines · Vipin Kumar
From: Shiraz Hashim<[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we
disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further
it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by Shiraz Hashim<[email protected]>---
drivers/net/macb.c| 38 ++++++++++++++++++++++++++++++++++----1 file changed, 34 insertions(+), 4 deletions(-)
Quoted 6 lines
Tested on Atmel EK board. It works.
Tested-by Bo Shen <[email protected]>BTW, would this be implemented as a workaround only for SPEAr320S?
Yes, The idea was to implement this only for spear320s
After your tested-by, I am thinking may be I can make a separate workaround config which can be enabled by any board using this peripheral.
Is that OK?
Regards
Vipin
PATCH 14/19 net/macb: workaround for transmission hang issue
Hi Vipin,
On 3/1/2013 11:40, Vipin Kumar wrote:
[Snip]
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Signed-off-by Shiraz Hashim<[email protected]>---
drivers/net/macb.c| 38 ++++++++++++++++++++++++++++++++++----1 file changed, 34 insertions(+), 4 deletions(-)Tested on Atmel EK board. It works.
Tested-by Bo Shen <[email protected]>
Quoted 8 lines
Quoted 2 lines
BTW, would this be implemented as a workaround only for SPEAr320S?
Yes, The idea was to implement this only for spear320s
After your tested-by, I am thinking may be I can make a separate workaround config which can be enabled by any board using this peripheral.Is that OK?
Agree.
Best Regards,
Bo Shen
PATCH 14/19 net/macb: workaround for transmission hang issue
In reply to Albert ARIBAUDQuoted 97 lines · Albert ARIBAUD
Quoted 94 lines · Albert ARIBAUD
Hi Vipin,
Quoted 89 lines · Vipin Kumar
From: Shiraz Hashim<[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.
Signed-off-by Shiraz Hashim<[email protected]>--- drivers/net/macb.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-)drivers/net/macb.c +34
-4@@ -55,7 +55,7 @@#define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096#define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1#define CONFIG_SYS_MACB_TX_TIMEOUT 1000#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 5000000@@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb->tx_ring[tx_head].ctrl = ctrl; macb->tx_ring[tx_head].addr = paddr;barrier (); -macb_writel (macb,NCR ,MACB_BIT (TE ) |MACB_BIT (RE ) |MACB_BIT (TSTART )); +/* +* Due to issues on SPEAr320 RMII, disable TE first so that +* controller can come out if it is hanged during transmission +*/ +macb_writel (macb,NCR ,macb_readl (macb,NCR )& ~MACB_BIT (TE )); +macb_writel (macb,NCR ,macb_readl (macb,NCR ) | +MACB_BIT (TE ) |MACB_BIT (TSTART ));/* * I guess this is necessary because the networking core may @@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw (struct macb_device *bp) +{ +/* Make sure we have the write buffer for ourselves */ +barrier (); +/* +* Disable RX and TX (XXX: Should we halt the transmission +* more gracefully?) and we should not close the mdio port +*/ +macb_writel (bp,NCR ,0 ); + +/* Clear the stats registers (XXX: Update stats first?) */ +macb_writel (bp,NCR ,MACB_BIT (CLRSTAT )); + +/* keep the mdio port , otherwise other eth will not work */ +macb_writel (bp,NCR ,MACB_BIT (MPE )); + +/* Clear all status flags */ +macb_writel (bp,TSR , ~0UL ); +macb_writel (bp,RSR , ~0UL ); + +/* Disable all interrupts */ +macb_writel (bp,IDR , ~0UL ); +macb_readl (bp,ISR ); +} +static int macb_init (struct eth_device *netdev,bd_t *bd) {struct macb_device *macb =to_macb (netdev);@@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr =macb_readl (macb,TSR ); }while (tsr&MACB_BIT (TGO )); -/* Disable TX and RX, and clear statistics */ -macb_writel (macb,NCR ,MACB_BIT (CLRSTAT )); +macb_reset_hw (macb); }
Quoted 7 lines
Quoted 4 lines
drivers/net/macb.c static void macb_halt(struct eth_device *netdev) · line 557
Quoted 1 line
drivers/net/macb.c +0
-0static int macb_write_hwaddr (struct eth_device *dev)This patch did not reappear in later versions of the series, and no other standalone patch seems to match it. Was it dropped?
Ping?
No, I have been busy with something. I would come back to the u-boot development soon
Vipin
Quoted 1 line
Amicalement,
PATCH 14/19 net/macb: workaround for transmission hang issue
Hi Vipin,
Quoted 103 lines · Vipin Kumar
Quoted 102 lines · Albert ARIBAUD
Quoted 98 lines · Albert ARIBAUD
Hi Vipin,
Quoted 81 lines · Vipin Kumar
From: Shiraz Hashim<[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.
Signed-off-by Shiraz Hashim<[email protected]>--- drivers/net/macb.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-)drivers/net/macb.c +33
-2@@ -55,7 +55,7 @@#define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096#define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1#define CONFIG_SYS_MACB_TX_TIMEOUT 1000#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 5000000@@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb->tx_ring[tx_head].ctrl = ctrl; macb->tx_ring[tx_head].addr = paddr;barrier (); -macb_writel (macb,NCR ,MACB_BIT (TE ) |MACB_BIT (RE ) |MACB_BIT (TSTART )); +/* +* Due to issues on SPEAr320 RMII, disable TE first so that +* controller can come out if it is hanged during transmission +*/ +macb_writel (macb,NCR ,macb_readl (macb,NCR )& ~MACB_BIT (TE )); +macb_writel (macb,NCR ,macb_readl (macb,NCR ) | +MACB_BIT (TE ) |MACB_BIT (TSTART ));/* * I guess this is necessary because the networking core may @@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw (struct macb_device *bp) +{ +/* Make sure we have the write buffer for ourselves */ +barrier (); +/* +* Disable RX and TX (XXX: Should we halt the transmission +* more gracefully?) and we should not close the mdio port +*/ +macb_writel (bp,NCR ,0 ); + +/* Clear the stats registers (XXX: Update stats first?) */ +macb_writel (bp,NCR ,MACB_BIT (CLRSTAT )); + +/* keep the mdio port , otherwise other eth will not work */ +macb_writel (bp,NCR ,MACB_BIT (MPE )); + +/* Clear all status flags */ +macb_writel (bp,TSR , ~0UL ); +macb_writel (bp,RSR , ~0UL ); + +/* Disable all interrupts */ +macb_writel (bp,IDR , ~0UL ); +macb_readl (bp,ISR ); +} +static int macb_init (struct eth_device *netdev,bd_t *bd) {struct macb_device *macb =to_macb (netdev);drivers/net/macb.c static void macb_halt(struct eth_device *netdev) · line 557
Quoted 9 lines
drivers/net/macb.c +1
-2@@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr =macb_readl (macb,TSR ); }while (tsr&MACB_BIT (TGO )); -/* Disable TX and RX, and clear statistics */ -macb_writel (macb,NCR ,MACB_BIT (CLRSTAT )); +macb_reset_hw (macb); }static int macb_write_hwaddr (struct eth_device *dev)This patch did not reappear in later versions of the series, and no other standalone patch seems to match it. Was it dropped?
Quoted 5 lines
Quoted 2 lines
Ping?
No, I have been busy with something. I would come back to the u-boot development soon
Thanks. Following your discussion with Bo Shen, should I expect a new version of this patch in the future, or does it stand as it is?
Quoted 1 line
Vipin
Amicalement,
Signature · 1 line
Albert.
PATCH 14/19 net/macb: workaround for transmission hang issue
Quoted 108 lines · Albert ARIBAUD
Hi Vipin,
Quoted 103 lines · Vipin Kumar
Quoted 102 lines · Albert ARIBAUD
Quoted 98 lines · Albert ARIBAUD
Hi Vipin,
Quoted 81 lines · Vipin Kumar
From: Shiraz Hashim<[email protected]>
It is observed on SPEAr320S RMII#1 interface that on transmitting packets the MAC dma hangs randomly and constantly showing busy tx-go state.
It comes out if this situation only when Transmission is disabled and enabled again.
Since it happens randomly and u-boot doesn't require high performance we disable TE and re-enable it on each transmission. We also change number of transmit descriptor to 1 as we would not require more than it, further it would not alter GMAC notion of transmit descriptor start queue as it always point to same descriptor.
Signed-off-by Shiraz Hashim<[email protected]>--- drivers/net/macb.c | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-)drivers/net/macb.c +33
-2@@ -55,7 +55,7 @@#define CONFIG_SYS_MACB_RX_BUFFER_SIZE 4096#define CONFIG_SYS_MACB_RX_RING_SIZE (CONFIG_SYS_MACB_RX_BUFFER_SIZE / 128) -#define CONFIG_SYS_MACB_TX_RING_SIZE 16 +#define CONFIG_SYS_MACB_TX_RING_SIZE 1#define CONFIG_SYS_MACB_TX_TIMEOUT 1000#define CONFIG_SYS_MACB_AUTONEG_TIMEOUT 5000000@@ -226,7 +226,13 @@ static int macb_send(struct eth_device *netdev, void *packet, int length) macb->tx_ring[tx_head].ctrl = ctrl; macb->tx_ring[tx_head].addr = paddr;barrier (); -macb_writel (macb,NCR ,MACB_BIT (TE ) |MACB_BIT (RE ) |MACB_BIT (TSTART )); +/* +* Due to issues on SPEAr320 RMII, disable TE first so that +* controller can come out if it is hanged during transmission +*/ +macb_writel (macb,NCR ,macb_readl (macb,NCR )& ~MACB_BIT (TE )); +macb_writel (macb,NCR ,macb_readl (macb,NCR ) | +MACB_BIT (TE ) |MACB_BIT (TSTART ));/* * I guess this is necessary because the networking core may @@ -444,6 +450,31 @@ static int macb_phy_init(struct macb_device *macb) } } +static void macb_reset_hw (struct macb_device *bp) +{ +/* Make sure we have the write buffer for ourselves */ +barrier (); +/* +* Disable RX and TX (XXX: Should we halt the transmission +* more gracefully?) and we should not close the mdio port +*/ +macb_writel (bp,NCR ,0 ); + +/* Clear the stats registers (XXX: Update stats first?) */ +macb_writel (bp,NCR ,MACB_BIT (CLRSTAT )); + +/* keep the mdio port , otherwise other eth will not work */ +macb_writel (bp,NCR ,MACB_BIT (MPE )); + +/* Clear all status flags */ +macb_writel (bp,TSR , ~0UL ); +macb_writel (bp,RSR , ~0UL ); + +/* Disable all interrupts */ +macb_writel (bp,IDR , ~0UL ); +macb_readl (bp,ISR ); +} +static int macb_init (struct eth_device *netdev,bd_t *bd) {struct macb_device *macb =to_macb (netdev);drivers/net/macb.c static void macb_halt(struct eth_device *netdev) · line 557
Quoted 9 lines
drivers/net/macb.c +1
-2@@ -520,8 +551,7 @@ static void macb_halt(struct eth_device *netdev) tsr =macb_readl (macb,TSR ); }while (tsr&MACB_BIT (TGO )); -/* Disable TX and RX, and clear statistics */ -macb_writel (macb,NCR ,MACB_BIT (CLRSTAT )); +macb_reset_hw (macb); }static int macb_write_hwaddr (struct eth_device *dev)This patch did not reappear in later versions of the series, and no other standalone patch seems to match it. Was it dropped?
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
Ping?
No, I have been busy with something. I would come back to the u-boot development soon
Thanks. Following your discussion with Bo Shen, should I expect a new version of this patch in the future, or does it stand as it is?
A new version
Vipin
Quoted 3 lines
Quoted 1 line
Vipin
Amicalement,
PATCH 15/19 misc/crypto: Add support for C3
In reply to Vipin KumarC3 is a cryptographic controller which is used by the SPL when DDR ECC support is enabled.
Basically, the DDR ECC feature requires the initialization of ECC values before the DDR can actually be used. To accomplish this, the complete on board DDR is initialized with zeroes. This initialization can be done using
* CPU
* CPU (with Dcache enabled)
* C3
The current SPL code uses C3 because the initialization using the CPU is slow and we do not have enough memory in SPL to initialize page tables required to enable MMU and Dcache
--- arch/arm/include/asm/arch-spear13xx/c3.h | 63 ++++++++++++++++ drivers/misc/Makefile | 1 + drivers/misc/c3.c | 122 +++++++++++++++++++++++++++++++ 3 files changed, 186 insertions(+) create mode 100644 arch/arm/include/asm/arch-spear13xx/c3.h create mode 100644 drivers/misc/c3.c
arch/arm/include/asm/arch-spear13xx/c3.h new file +63 -0
@@ -0,0 +1,63 @@ +/* +* (C) Copyright 2012 +* ST Micoelectronics Pvt. Ltd. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _MISC_C3_ +#define _MISC_C3_ + +#include <asm/arch/hardware.h> + +#define C3_HIF_OFF 0x400/* master interface registers */ + +#define C3_INT_MEM_BASE_ADDR (CONFIG_SYS_C3_BASE + 0x400) +#define C3_HIF_MBAR (C3_INT_MEM_BASE_ADDR + 0x304) +#define C3_LOCAL_MEM_ADDR 0xF0000000 +#define C3_HIF_MCR (C3_INT_MEM_BASE_ADDR + 0x308) +#define C3_HIF_MCR_ENB_INT_MEM 0x01 +#define C3_HIF_MAAR (C3_INT_MEM_BASE_ADDR + 0x310) +#define C3_HIF_MADR (C3_INT_MEM_BASE_ADDR + 0x314) + +/* ID0 Registers definition */ +#define C3_ID0_SCR (CONFIG_SYS_C3_BASE + 0x1000) +#define C3_ID0_SCR_RST (1 << 16) +#define C3_ID0_IP (CONFIG_SYS_C3_BASE + 0x1000 + 0x10) +#define C3_ID0_DEF_RDY_VAL 0x80002AAA +#define C3_ID0_STATE_MASK 0xC0000000 +#define C3_ID0_STATE_RUN 0xC0000000 +#define C3_ID0_STATE_IDLE 0x80000000 + +/* C3 Register Offsets */ +#define C3_MOVE_CHANNEL_ID (CONFIG_SYS_C3_BASE + 0x2000 + 0x3FC) +#define C3_MOVE_CHANNEL_ID_VAL 0x00000102 + +#define C3_INT_MEM_SIZE 0x4000 +#define C3_MOVE_AND (1 << 21) + +/* Some Commands */ +#define C3_CMD_MOVE_INIT 0x06000000 +#define C3_CMD_MOVE_DATA 0x0A800000 +#define C3_CMD_STOP 0x00000000 + +void *c3_memset (void *s,int c,size_t count); +int c3_init (void ); + +#endif
drivers/misc/Makefile +1 -0
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB := $(obj)libmisc.o COBJS-$(CONFIG_ALI152X) += ali512x.o +COBJS-$(CONFIG_C3) += c3.o COBJS-$(CONFIG_DS4510) += ds4510.o COBJS-$(CONFIG_FSL_LAW) += fsl_law.o COBJS-$(CONFIG_GPIO_LED) += gpio_led.o
drivers/misc/c3.c new file +122 -0
122 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 16/19 armv7/ltimer: Add support for local timer on armv7 cpus
In reply to Vipin KumarCertain ARMV7 cpus eg. CortexA9 contains a local and a global timer within the CPU core itself. This patch adds generic support for local timer.
--- arch/arm/cpu/armv7/Makefile | 11 ++- arch/arm/cpu/armv7/ca9_ltimer.c | 154 ++++++++++++++++++++++++++++++++++++++ arch/arm/include/asm/ca9_ltimer.h | 40 ++++++++++ 3 files changed, 201 insertions(+), 4 deletions(-) create mode 100644 arch/arm/cpu/armv7/ca9_ltimer.c create mode 100644 arch/arm/include/asm/ca9_ltimer.h
arch/arm/cpu/armv7/Makefile +7 -4
@@ -27,15 +27,18 @@ LIB = $(obj)lib$(CPU).o START := start.o -COBJS += cache_v7.o +COBJS-y += cache_v7.o -COBJS += cpu.o -COBJS += syslib.o +COBJS-y += cpu.o +COBJS-y += syslib.o +COBJS-$(CONFIG_ARMV7_CA9LTIMER) += ca9_ltimer.o ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA20),) -SOBJS += lowlevel_init.o +SOBJS-y += lowlevel_init.o endif +COBJS := $(sort $(COBJS-y)) +SOBJS := $(sort $(SOBJS-y)) SRCS := $(START:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) START := $(addprefix $(obj),$(START))
arch/arm/cpu/armv7/ca9_ltimer.c new file +154 -0
154 lines not on this page · raw message
arch/arm/include/asm/ca9_ltimer.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Micoelectronics, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __ARCH_ARM_CA9TIMER_H +#define __ARCH_ARM_CA9TIMER_H + +struct ca9_timer_regs { +u32 load; +u32 count; +u32 control; +}; + +/* control related definitions */ +#define AUTO_RELOAD (1 << 1) +#define TIMER_ENABLE (1 << 0) + +/* load related definitions */ +#define FREE_RUNNING (0xFFFFFFFF) + +#endif
Signature · 1 line
1.7.11.4
PATCH 17/19 imls: Add support to list images in NAND device
In reply to Vipin Kumarimls does not list the images in NAND devices. This patch implements this support for legacy type images.
--- common/cmd_bootm.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+)
common/cmd_bootm.c +98 -0
@@ -62,6 +62,11 @@#include <linux/lzo.h> #endif /* CONFIG_LZO */ +#if defined(CONFIG_CMD_NAND ) +#include <linux/err.h> +#include <nand.h> +#endif +DECLARE_GLOBAL_DATA_PTR ;#ifndef CONFIG_SYS_BOOTM_LEN
@@ -1221,6 +1226,99 @@ next_sector: ; next_bank: ; } +#if defined(CONFIG_CMD_NAND ) +printf ("\n" ); +nand_info_t *nand; +image_header_t image_header; +image_header_t *header = &image_header; +int nand_dev = nand_curr_device; +unsigned long img_size; +size_t hdr_size, read_len; +loff_t off; +unsigned int crc; +u_char *data; + +/* the following commands operate on the current device */ +if (nand_dev <0 || nand_dev >=CONFIG_SYS_MAX_NAND_DEVICE ) { +puts ("\nNo NAND devices available\n" ); +return 0 ; + } + +for (nand_dev =0 ; nand_dev <CONFIG_SYS_MAX_NAND_DEVICE ; nand_dev++) { + + nand = &nand_info[nand_dev]; +if ((!nand->name) || (!nand->size)) +continue ; + + data =malloc (nand->writesize); +if (!data) { +puts ("No memory available to list NAND images\n" ); +return 0 ; + } + +for (off =0 ; off < nand->size; off += nand->erasesize) { +int ret; + +if (nand_block_isbad (nand, off)) +continue ; + + hdr_size =sizeof (image_header_t); + ret =nand_read (nand, off, &hdr_size, (u_char *)header); +if (ret <0 && ret != -EUCLEAN ) +continue ; + +if (!image_check_hcrc (header)) +continue ; + +printf ("Legacy Image@NAND device %d offset %08lX:\n" , + nand_dev, (ulong )off); +image_print_contents (header); + +puts (" Verifying Checksum ... " ); + crc =0 ; + img_size =ntohl (header->ih_size); + img_size += hdr_size; + +while (img_size >0 ) { +int blockoff =0 ; + +while (nand_block_isbad (nand, off)) { + off += nand->erasesize; +if (off >= nand->size) + goto out; + } + +do { + read_len =min (img_size, + nand->writesize); + ret =nand_read (nand, off + blockoff, + &read_len, data); +if (ret <0 && ret != -EUCLEAN ) +break ; + + crc =crc32 (crc, data + hdr_size, + read_len - hdr_size); + img_size -= read_len; + blockoff += read_len; + hdr_size =0 ; + }while (img_size && + (blockoff < nand->erasesize)); + + off += nand->erasesize; +if (off >= nand->size) + goto out; + } + off -= nand->erasesize; +out: +if (crc !=ntohl (header->ih_dcrc)) +puts (" Bad Data CRC\n" ); +else +puts ("OK\n" ); + } +free (data); + } + +#endif return (0 ); }
Signature · 1 line
1.7.11.4
PATCH 17/19 imls: Add support to list images in NAND device
Quoted 15 lines · Vipin Kumar
imls does not list the images in NAND devices. This patch implements this
support for legacy type images.Signed-off-by Vipin Kumar <[email protected]>--- common/cmd_bootm.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+)common/cmd_bootm.c +0
-0
common/cmd_bootm.c line 68
Quoted 7 lines
common/cmd_bootm.c +4
-0@@ -62,6 +62,11 @@#include <linux/lzo.h> #endif /* CONFIG_LZO */ +#if defined(CONFIG_CMD_NAND ) +#include <linux/err.h> +#include <nand.h> +#endif
You shouldn't need to ifdef-protect header files.
Quoted 14 lines
common/cmd_bootm.c +7
-0DECLARE_GLOBAL_DATA_PTR ;#ifndef CONFIG_SYS_BOOTM_LEN @@ -1221,6 +1226,99 @@ next_sector: ; next_bank: ; } +#if defined(CONFIG_CMD_NAND ) +printf ("\n" ); +nand_info_t *nand; +image_header_t image_header; +image_header_t *header = &image_header; +int nand_dev = nand_curr_device; +unsigned long img_size;
common/cmd_bootm.c next_sector: ; · line 1245
Quoted 10 lines
common/cmd_bootm.c +10
-0+size_t hdr_size, read_len; +loff_t off; +unsigned int crc; +u_char *data; + +/* the following commands operate on the current device */ +if (nand_dev <0 || nand_dev >=CONFIG_SYS_MAX_NAND_DEVICE ) { +puts ("\nNo NAND devices available\n" ); +return 0 ; + }
Please move the NAND and NOR code into their own functions.
common/cmd_bootm.c next_sector: ; · line 1251
Quoted 7 lines
common/cmd_bootm.c +6
-0+ +for (nand_dev =0 ; nand_dev <CONFIG_SYS_MAX_NAND_DEVICE ; nand_dev++) { + + nand = &nand_info[nand_dev]; +if ((!nand->name) || (!nand->size)) +continue ;
Redundant parentheses.
Quoted 17 lines
common/cmd_bootm.c +14
-0+ data =malloc (nand->writesize); +if (!data) { +puts ("No memory available to list NAND images\n"); +return 0 ; + } + +for (off =0 ; off < nand->size; off += nand->erasesize) { +int ret; + +if (nand_block_isbad (nand, off)) +continue ; + + hdr_size =sizeof (image_header_t); + ret = nand_read(nand, off, &hdr_size, (u_char*)header);
common/cmd_bootm.c
Quoted 2 lines
common/cmd_bootm.c +2
-0+if (ret <0 && ret != -EUCLEAN ) +continue ;
I guess you don't use nand_read_skip_bad() because you don't want to allocate a buffer for the whole image... How about moving this code to nand_util.c? That would at least allow some refactoring rather than duplication.
common/cmd_bootm.c next_sector: ; · line 1275
Quoted 7 lines
common/cmd_bootm.c +4
-0+if (!image_check_hcrc (header)) +continue ; + + printf("Legacy Image at NAND device %d offset%08lX:\n",
common/cmd_bootm.c +2
-0+ nand_dev, (ulong)off); +image_print_contents (header);
Shouldn't you check for FIT images as well?
Quoted 37 lines
common/cmd_bootm.c +17
-0+puts (" Verifying Checksum ... " ); + crc =0 ; + img_size =ntohl (header->ih_size); + img_size += hdr_size; + + while (img_size > 0) { + int blockoff = 0; + + while (nand_block_isbad(nand, off)) { + off += nand->erasesize; + if (off >= nand->size) + goto out; + } + + do { + read_len = min(img_size, +
nand->writesize);common/cmd_bootm.c +1
-0+ ret = nand_read(nand, off +blockoff,
common/cmd_bootm.c +1
-0+ &read_len,data);
common/cmd_bootm.c +4
-0+if (ret <0 && ret != -EUCLEAN ) +break ; + + crc = crc32(crc, data +
hdr_size,common/cmd_bootm.c +1
-0+ read_len -
hdr_size);common/cmd_bootm.c +5
-0+ img_size -= read_len; + blockoff += read_len; + hdr_size =0 ; + } while (img_size && + (blockoff <
nand->erasesize));common/cmd_bootm.c +2
-0+ + off += nand->erasesize;
common/cmd_bootm.c next_sector: ; · line 1317
Quoted 10 lines
common/cmd_bootm.c +10
-0+if (off >= nand->size) + goto out; + } + off -= nand->erasesize; +out: +if (crc !=ntohl (header->ih_dcrc)) +puts (" Bad Data CRC\n" ); +else +puts ("OK\n" ); + }
Please refactor this into separate functions to improve readability. Maybe put a nand_crc_skip_bad() function into nand_util.c?
-Scott
PATCH 17/19 imls: Add support to list images in NAND device
Quoted 18 lines · Scott Wood
Quoted 17 lines · Vipin Kumar
imls does not list the images in NAND devices. This patch implements this support for legacy type images.
Signed-off-by Vipin Kumar <[email protected]>---
common/cmd_bootm.c| 98
++++++++++++++++++++++++++++++++++++++++++++++++++++++1 file changed, 98 insertions(+)common/cmd_bootm.c +0
-0@@ -62,6 +62,11 @@#include <linux/lzo.h> #endif /* CONFIG_LZO */
Quoted 7 lines
common/cmd_bootm.c line 68
Quoted 4 lines
common/cmd_bootm.c +4
-0+#if defined(CONFIG_CMD_NAND ) +#include <linux/err.h> +#include <nand.h> +#endif You shouldn't need to ifdef-protect header files.
OK. I would correct this in v2
Quoted 18 lines
Quoted 18 lines
common/cmd_bootm.c +11
-0DECLARE_GLOBAL_DATA_PTR ;#ifndef CONFIG_SYS_BOOTM_LEN @@ -1221,6 +1226,99 @@ next_sector: ; next_bank: ; } +#if defined(CONFIG_CMD_NAND ) +printf ("\n" ); +nand_info_t *nand; +image_header_t image_header; +image_header_t *header = &image_header; +int nand_dev = nand_curr_device; +unsigned long img_size; +size_t hdr_size, read_len; +loff_t off; +unsigned int crc; +u_char *data;
Quoted 9 lines
common/cmd_bootm.c next_sector: ; · line 1245
Quoted 6 lines
common/cmd_bootm.c +6
-0+ +/* the following commands operate on the current device */ +if (nand_dev <0 || nand_dev >=CONFIG_SYS_MAX_NAND_DEVICE ) { +puts ("\nNo NAND devices available\n" ); +return 0 ; + }Please move the NAND and NOR code into their own functions.
You mean I can separate the NOR list images code in one routine and NAND in another?
Quoted 9 lines
common/cmd_bootm.c next_sector: ; · line 1251
Quoted 6 lines
common/cmd_bootm.c +6
-0+ +for (nand_dev =0 ; nand_dev <CONFIG_SYS_MAX_NAND_DEVICE ; nand_dev++) { + + nand = &nand_info[nand_dev]; +if ((!nand->name) || (!nand->size)) +continue ;Redundant parentheses.
Accepted
Quoted 24 lines
Quoted 6 lines
common/cmd_bootm.c +6
-0+ data =malloc (nand->writesize); +if (!data) { +puts ("No memory available to list NAND images\n" ); +return 0 ; + } +common/cmd_bootm.c next_sector: ; · line 1268
Quoted 10 lines
common/cmd_bootm.c +10
-0+for (off =0 ; off < nand->size; off += nand->erasesize) { +int ret; + +if (nand_block_isbad (nand, off)) +continue ; + + hdr_size =sizeof (image_header_t); + ret =nand_read (nand, off, &hdr_size, (u_char *)header); +if (ret <0 && ret != -EUCLEAN ) +continue ;I guess you don't use
nand_read_skip_bad()because you don't want to allocate a buffer for the whole image... How about moving this code tonand_util.c? That would at least allow some refactoring rather than duplication.
Quoted 9 lines
common/cmd_bootm.c next_sector: ; · line 1275
Quoted 6 lines
common/cmd_bootm.c +6
-0+if (!image_check_hcrc (header)) +continue ; + +printf ("Legacy Image at NAND device %d offset %08lX:\n" , + nand_dev, (ulong )off); +image_print_contents (header);Shouldn't you check for FIT images as well?
Yes. I was a bit reluctant because I don't know about that format. OK, I would try to add it in v2
Quoted 36 lines
Quoted 36 lines
common/cmd_bootm.c +36
-0+puts (" Verifying Checksum ... " ); + crc =0 ; + img_size =ntohl (header->ih_size); + img_size += hdr_size; + +while (img_size >0 ) { +int blockoff =0 ; + +while (nand_block_isbad (nand, off)) { + off += nand->erasesize; +if (off >= nand->size) + goto out; + } + +do { + read_len =min (img_size, + nand->writesize); + ret =nand_read (nand, off + blockoff, + &read_len, data); +if (ret <0 && ret != -EUCLEAN ) +break ; + + crc =crc32 (crc, data + hdr_size, + read_len - hdr_size); + img_size -= read_len; + blockoff += read_len; + hdr_size =0 ; + }while (img_size && + (blockoff < nand->erasesize)); + + off += nand->erasesize; +if (off >= nand->size) + goto out; + } + off -= nand->erasesize; +out:
Quoted 9 lines
common/cmd_bootm.c next_sector: ; · line 1317
Quoted 5 lines
common/cmd_bootm.c +5
-0+if (crc !=ntohl (header->ih_dcrc)) +puts (" Bad Data CRC\n" ); +else +puts ("OK\n" ); + }Please refactor this into separate functions to improve readability. Maybe put a
nand_crc_skip_bad()function intonand_util.c?
OK, I would give it a try. Please wait for v2
Quoted 2 lines
-Scott
btw, thanks for the review
How about other patches, Albert, Wolfgang ?
Regards
Vipin
PATCH 17/19 imls: Add support to list images in NAND device
Quoted 23 lines · Vipin Kumar
Quoted 12 lines · Scott Wood
Quoted 11 lines · Vipin Kumar
+#if
defined(CONFIG_CMD_NAND)
+printf("\n");
+nand_info_t*nand;
+image_header_timage_header;
+image_header_t*header =&image_header;
+ intnand_dev=nand_curr_device;
+ unsigned longimg_size;
+size_thdr_size,read_len;
+loff_toff;
+ unsigned int crc;
+u_char*data;Quoted 9 lines
Quoted 6 lines
+
+ /* the following commands operate on the current device */
+ if (nand_dev< 0 ||nand_dev>=CONFIG_SYS_MAX_NAND_DEVICE) {
+puts("\nNo NAND devices available\n");
+ return 0;
+ }Please move the NAND and NOR code into their own functions.
Quoted 2 lines
You mean I can separate the NOR list images code in one routine and NAND in another?
Yes.
-Scott
PATCH 18/19 u-boot/spl: Add u-boot-spl.img to u-boot targets
In reply to Vipin Kumar--- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+)
Makefile +10 -0
@@ -497,6 +497,13 @@ $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin elftosb -zdf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd \ -o $(obj)u-boot.sb +$(obj)spl/u-boot-spl.img: $(obj)spl/u-boot-spl.bin + $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ + -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) \ + -n $(shell sed -n -e 's/.*U_BOOT_SPL_VERSION//p' $(VERSION_FILE) | \ + sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ + -d $(obj)spl/u-boot-spl.bin $(obj)spl/u-boot-spl.img + # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. # Both images are created using mkimage (crc etc), so that the ROM # bootloader can check its integrity. Padding needs to be done to the
@@ -704,6 +711,9 @@ $(VERSION_FILE): "$(U_BOOT_VERSION)" "$${localvers}" ; \ printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \ "$(U_BOOT_VERSION)" "$${localvers}" ; \ + printf '#define U_BOOT_SPL_VERSION "%s %s%s"\n' \ + $(if $(CONFIG_SPL_IMAGENAME),$(CONFIG_SPL_IMAGENAME),"U-Boot SPL") \ + "$(U_BOOT_VERSION)" "$${localvers}" ; \ ) > [email protected] @( printf '#define CC_VERSION_STRING "%s"\n' \ '$(shell $(CC) --version | head -n 1)' )>> [email protected]
Signature · 1 line
1.7.11.4
PATCH 19/19 arm/boards: Define a new config option CONFIG_BOOT_PARAMS_P
In reply to Vipin KumarA lot of ARM boards are using board_init routine just to initialize boot_params variable in the global data structure.
This patch lets the board config files to define a CONFIG_BOOT_PARAMS_P option which is assigned to gd->bd->bi_boot_params automatically
Consequently, many board_init routines would not be required in the respective board directories and a weak definition becomes necessary before their removal from the code.
--- README | 6 ++++++ arch/arm/lib/board.c | 12 ++++++++++++ 2 files changed, 18 insertions(+)
README +6 -0
@@ -550,6 +550,12 @@ The following options need to be configured: in a single configuration file and the machine type is runtime discoverable, do not have to use this setting. + CONFIG_BOOT_PARAMS_P [relevant for ARM only] + + This config option can provide a way to initialize + bi_boot_params from the u-boot infrastructure itself. The + board still has the option to override it in board_init routine + - vxWorks boot parameters: bootvx constructs a valid bootline using the following
arch/arm/lib/board.c +12 -0
@@ -399,6 +399,11 @@ void board_init_f(ulong bootflag) gd->bd->bi_arch_number =CONFIG_MACH_TYPE ;/* board id for Linux */ #endif +#ifdef CONFIG_BOOT_PARAMS_P +/* Boot params passed to Linux */ + gd->bd->bi_boot_params =CONFIG_BOOT_PARAMS_P ; +#endif + addr_sp -=sizeof (gd_t); id = (gd_t *) addr_sp; debug("Reserving %zu Bytes for Global Data at: %08lx\n",
@@ -468,6 +473,13 @@ void board_init_f(ulong bootflag)static char *failed ="*** failed ***\n" ;#endif +static int __def_board_init (bd_t *bis) +{ +return -1 ; +} + +int board_init (void ) __attribute__((weak,alias ("__def_board_init" ))); +/* ************************************************************************ *
Signature · 1 line
1.7.11.4
PATCH 1/7 spear1340: Add support for spear1340 SoC
In reply to a message not in the archivespear1340 is a CortexA9 dual core SoC which supports multiple peripherals like GMII, USBH etc. More information can be found at
http://www.st.com/internet/mcu/product/251211.jsp
This patch adds support for spear1340 SoC. It also adds support for pinum for spear1340. The APIs implemented for this purpose are
* _void spear1340_configure_pin(u32 plgpio, u32 mode)_
* _int spear1340_plgpio_get(u32 plgpio)_
* _void spear1340_plgpio_set(u32 plgpio, u32 val)_
--- arch/arm/cpu/armv7/spear13xx/Makefile | 50 +++ arch/arm/cpu/armv7/spear13xx/reset.c | 47 +++ arch/arm/cpu/armv7/spear13xx/spear1340-pinmux.c | 439 +++++++++++++++++++++ arch/arm/cpu/armv7/spear13xx/spear1340.c | 270 +++++++++++++ arch/arm/cpu/armv7/spear13xx/spear13xx.c | 32 ++ arch/arm/include/asm/arch-spear13xx/generic.h | 33 ++ arch/arm/include/asm/arch-spear13xx/gpio.h | 42 ++ arch/arm/include/asm/arch-spear13xx/hardware.h | 31 ++ arch/arm/include/asm/arch-spear13xx/misc.h | 31 ++ arch/arm/include/asm/arch-spear13xx/mmc.h | 29 ++ arch/arm/include/asm/arch-spear13xx/pinmux.h | 104 +++++ arch/arm/include/asm/arch-spear13xx/spear1340.h | 159 ++++++++ .../include/asm/arch-spear13xx/spear1340_misc.h | 331 ++++++++++++++++ arch/arm/include/asm/arch-spear13xx/spear13xx.h | 46 +++ drivers/usb/host/ehci-spear.c | 2 + include/linux/bitops.h | 12 + 16 files changed, 1658 insertions(+) create mode 100644 arch/arm/cpu/armv7/spear13xx/Makefile create mode 100644 arch/arm/cpu/armv7/spear13xx/reset.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1340-pinmux.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1340.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear13xx.c create mode 100644 arch/arm/include/asm/arch-spear13xx/generic.h create mode 100644 arch/arm/include/asm/arch-spear13xx/gpio.h create mode 100644 arch/arm/include/asm/arch-spear13xx/hardware.h create mode 100644 arch/arm/include/asm/arch-spear13xx/misc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/mmc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/pinmux.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1340.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1340_misc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear13xx.h
arch/arm/cpu/armv7/spear13xx/Makefile new file +50 -0
@@ -0,0 +1,50 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# (C) Copyright 2008 +# Guennadi Liakhovetki, DENX Software Engineering, <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(SOC).o + +COBJS-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o +COBJS-$(CONFIG_SOC_SPEAR1340) += spear1340.o +COBJS-$(CONFIG_SOC_SPEAR1340) += spear1340-pinmux.o + +SRCS := $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) + +all: $(obj).depend $(LIB) + +$(LIB): $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
arch/arm/cpu/armv7/spear13xx/reset.c new file +47 -0
47 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spear1340-pinmux.c new file +439 -0
439 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spear1340.c new file +270 -0
270 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spear13xx.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Micoelectronics, vipin.kumar at st.com. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +void enable_caches (void ) +{ +#ifndef CONFIG_SYS_DCACHE_OFF +/* Enable D-cache. I-cache is already enabled in start.S */ +dcache_enable (); +#endif +}
arch/arm/include/asm/arch-spear13xx/generic.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Micoelectronics, vipin.kumar at st.com. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __ARCH_ARM_GENERIC_H__ +#define __ARCH_ARM_GENERIC_H__ + +#if defined(CONFIG_SOC_SPEAR1310 ) +extern void spear1310_usbh_stop (void ); +#elif defined(CONFIG_SOC_SPEAR1340 ) +extern void spear1340_usbh_stop (void ); +#endif + +#endif
arch/arm/include/asm/arch-spear13xx/gpio.h new file +42 -0
42 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/hardware.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARCH_HARDWARE_H +#define _ASM_ARCH_HARDWARE_H + +#if defined(CONFIG_SOC_SPEAR1340 ) +#include <asm/arch/spear1340.h> +#endif + +#endif /* _ASM_ARCH_HARDWARE_H */
arch/arm/include/asm/arch-spear13xx/misc.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Microelectronics, vipin.kumar at st.com +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARCH_MISC_H +#define _ASM_ARCH_MISC_H + +#ifdef CONFIG_SOC_SPEAR1340 +#include <asm/arch/spear1340_misc.h> +#endif + +#endif
arch/arm/include/asm/arch-spear13xx/mmc.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Micoelectronics, vipin.kumar at st.com. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARCH_MMC_H +#define _ASM_ARCH_MMC_H + +extern int spear_sdhci_init (u32 regbase,u32 max_clk,u32 min_clk,u32 quirks); + +#endif
arch/arm/include/asm/arch-spear13xx/pinmux.h new file +104 -0
104 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/spear1340.h new file +159 -0
159 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/spear1340_misc.h new file +331 -0
331 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/spear13xx.h new file +46 -0
46 lines not on this page · raw message
drivers/usb/host/ehci-spear.c +2 -0
@@ -59,6 +59,8 @@ int ehci_hcd_stop(int index)spear3xx_usbh_stop ();#elif defined(CONFIG_ARCH_SPEAR6XX )spear6xx_usbh_stop (); +#elif defined(CONFIG_SOC_SPEAR1340 ) +spear1340_usbh_stop ();#else #error No spear platforms defined#endif
include/linux/bitops.h +12 -0
@@ -115,6 +115,10 @@ static inline unsigned int generic_hweight8(unsigned int w)# define __set_bit generic_set_bit#endif +#ifndef PLATFORM__TEST_BIT +# define __test_bit generic_test_bit +#endif +#ifndef PLATFORM__CLEAR_BIT # define __clear_bit generic_clear_bit#endif
@@ -144,6 +148,14 @@ static inline void generic_set_bit(int nr, volatile unsigned long *addr) *p |= mask; } +static inline int generic_test_bit (int nr,volatile unsigned long *addr) +{ +unsigned long mask =BIT_MASK (nr); +unsigned long *p = ((unsigned long *)addr) +BIT_WORD (nr); + +return !!(*p & mask); +} +static inline void generic_clear_bit (int nr,volatile unsigned long *addr) {unsigned long mask =BIT_MASK (nr);
Signature · 1 line
1.7.11.4
PATCH 2/7 spear1310: Add support for spear1310 SoC
spear1310 is a CortexA9 dual core SoC which supports multiple peripherals like GMII, USBH, PCIe etc. More information can be found at
http://www.st.com/internet/mcu/product/250658.jsp
This patch adds support for spear1310 SoC. This patch also adds support for pinmux for spear1310 SoC. The APIs implemented are
* spear1310_configure_pin: Configures a particular pin to GPIO, PULLDOWN, PULLUP. The prototype is as follows
_void spear1310_configure_pin(u32 plgpio, u32 mode)_
* spear1310_plgpio_get: Configures a particular pin to GPIO IN and gets the value on that particular GPIO. The prototype is as follows _int spear1310_plgpio_get(u32 plgpio)_
* spear1310_plgpio_set: Configures a particular pin to GPIO OUT and sets a value on that particular GPIO. The prototype is as follows _void spear1310_plgpio_set(u32 plgpio, u32 val)_
--- arch/arm/cpu/armv7/spear13xx/Makefile | 2 + arch/arm/cpu/armv7/spear13xx/spear1310-pinmux.c | 860 +++++++++++++++++++++ arch/arm/cpu/armv7/spear13xx/spear1310.c | 205 +++++ arch/arm/include/asm/arch-spear13xx/hardware.h | 2 + arch/arm/include/asm/arch-spear13xx/misc.h | 3 + arch/arm/include/asm/arch-spear13xx/pinmux.h | 10 + arch/arm/include/asm/arch-spear13xx/spear1310.h | 244 ++++++ .../include/asm/arch-spear13xx/spear1310_misc.h | 300 +++++++ drivers/usb/host/ehci-spear.c | 2 + 9 files changed, 1628 insertions(+) create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1310-pinmux.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1310.c create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1310.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1310_misc.h
arch/arm/cpu/armv7/spear13xx/Makefile +2 -0
@@ -29,6 +29,8 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o COBJS-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o +COBJS-$(CONFIG_SOC_SPEAR1310) += spear1310.o +COBJS-$(CONFIG_SOC_SPEAR1310) += spear1310-pinmux.o COBJS-$(CONFIG_SOC_SPEAR1340) += spear1340.o COBJS-$(CONFIG_SOC_SPEAR1340) += spear1340-pinmux.o
arch/arm/cpu/armv7/spear13xx/spear1310-pinmux.c new file +860 -0
860 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spear1310.c new file +205 -0
205 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/hardware.h +2 -0
@@ -26,6 +26,8 @@#if defined(CONFIG_SOC_SPEAR1340 )#include <asm/arch/spear1340.h> +#elif defined(CONFIG_SOC_SPEAR1310 ) +#include <asm/arch/spear1310.h> #endif #endif /* _ASM_ARCH_HARDWARE_H */
arch/arm/include/asm/arch-spear13xx/misc.h +3 -0
@@ -26,6 +26,9 @@#ifdef CONFIG_SOC_SPEAR1340 #include <asm/arch/spear1340_misc.h> + +#elif defined(CONFIG_SOC_SPEAR1310 ) +#include <asm/arch/spear1310_misc.h> #endif #endif
arch/arm/include/asm/arch-spear13xx/pinmux.h +10 -0
@@ -72,17 +72,22 @@ enum pinmux_ip {PMX_SDMMC ,PMX_EMI ,PMX_SMI , +PMX_LEGGPIO0 , + PMX_LEGGPIO1, };/* UART0 modem modes */ #define PMX_UART_SIMPLE 1#define PMX_UART_MODEM 2 +#define PMX_UART_DISSD 3 +#define PMX_UART_DISI2C0 4/* SSP modes */ #define PMX_SSP_CS0 1#define PMX_SSP_CS1 2#define PMX_SSP_CS2 3#define PMX_SSP_CS3 4 +#define PMX_SSP_CS1_CS2 5/* ETH modes */ #define PMX_ETH_GMII 1
@@ -95,6 +100,11 @@ enum pinmux_ip {/* NAND modes */ #define PMX_NAND_8BIT 1#define PMX_NAND_16BIT 2 +#define PMX_NAND_4CHIPS 3 + +/* SMI modes */ +#define PMX_SMI_2CHIPS 1 +#define PMX_SMI_4CHIPS 2/* PLGPIO modes */ #define PMX_GPIO 1
arch/arm/include/asm/arch-spear13xx/spear1310.h new file +244 -0
244 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/spear1310_misc.h new file +300 -0
300 lines not on this page · raw message
drivers/usb/host/ehci-spear.c +2 -0
@@ -59,6 +59,8 @@ int ehci_hcd_stop(int index)spear3xx_usbh_stop ();#elif defined(CONFIG_ARCH_SPEAR6XX )spear6xx_usbh_stop (); +#elif defined(CONFIG_SOC_SPEAR1310 ) +spear1310_usbh_stop ();#elif defined(CONFIG_SOC_SPEAR1340 )spear1340_usbh_stop ();#else
Signature · 1 line
1.7.11.4
PATCH 3/7 spear1340evb: Add support for evb machine
In reply to Vipin Kumar--- MAINTAINERS | 1 + board/st/spear13xx/Makefile | 50 ++++++++++++++ board/st/spear13xx/config.mk | 26 ++++++++ board/st/spear13xx/spear1340evb.c | 94 +++++++++++++++++++++++++++ board/st/spear13xx/spear13xx_common.c | 49 ++++++++++++++ boards.cfg | 3 + include/configs/spear1340-evb.h | 119 ++++++++++++++++++++++++++++++++++ include/configs/spear1340.h | 30 +++++++++ include/configs/spear13xx.h | 72 ++++++++++++++++++++ 9 files changed, 444 insertions(+) create mode 100644 board/st/spear13xx/Makefile create mode 100644 board/st/spear13xx/config.mk create mode 100644 board/st/spear13xx/spear1340evb.c create mode 100644 board/st/spear13xx/spear13xx_common.c create mode 100644 include/configs/spear1340-evb.h create mode 100644 include/configs/spear1340.h create mode 100644 include/configs/spear13xx.h
MAINTAINERS +1 -0
@@ -747,6 +747,7 @@ Vipin Kumar <[email protected]> spear320 ARM926EJS (spear320 Soc) spear320-hmi ARM926EJS (spear320 SoC) spear600 ARM926EJS (spear600 Soc) + spear1340-evb ARM ARMV7 (spear1340 SoC) Sergey Lapin <[email protected]>
board/st/spear13xx/Makefile new file +50 -0
50 lines not on this page · raw message
board/st/spear13xx/config.mk new file +26 -0
@@ -0,0 +1,26 @@ +# +# Copyright (C) 2012 ST Microelectronics +# Vipin Kumar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +ifndef CONFIG_SPL_BUILD +ALL-y += $(obj)u-boot.img +endif
board/st/spear13xx/spear1340evb.c new file +94 -0
94 lines not on this page · raw message
board/st/spear13xx/spear13xx_common.c new file +49 -0
49 lines not on this page · raw message
boards.cfg +3 -0
@@ -269,6 +269,9 @@ origen arm armv7 origen samsung exynos s5pc210_universal arm armv7 universal_c210 samsung exynos smdk5250 arm armv7 smdk5250 samsung exynos smdkv310 arm armv7 smdkv310 samsung exynos +spear1340 arm armv7 spear13xx st spear13xx spear1340-evb:spear1340 +spear1340_nand arm armv7 spear13xx st spear13xx spear1340-evb:spear1340,nand +spear1340_usbtty arm armv7 spear13xx st spear13xx spear1340-evb:spear1340,usbtty trats arm armv7 trats samsung exynos harmony arm armv7:arm720t harmony nvidia tegra20 seaboard arm armv7:arm720t seaboard nvidia tegra20
include/configs/spear1340-evb.h new file +119 -0
119 lines not on this page · raw message
include/configs/spear1340.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __CONFIG_SPEAR1340_H +#define __CONFIG_SPEAR1340_H + +#define CONFIG_SOC_SPEAR1340 + +#include <configs/spear13xx.h> +#endif /* __CONFIG_SPEAR1340_H */
include/configs/spear13xx.h new file +72 -0
72 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 4/7 spear1310evb: Add support for evb machine
In reply to Vipin Kumar--- MAINTAINERS | 1 + board/st/spear13xx/Makefile | 1 + board/st/spear13xx/spear1310evb.c | 93 ++++++++++++++++++++++++++++ board/st/spear13xx/spear13xx_common.c | 2 + boards.cfg | 3 + include/configs/spear1310-evb.h | 113 ++++++++++++++++++++++++++++++++++ include/configs/spear1310.h | 35 +++++++++++ 7 files changed, 248 insertions(+) create mode 100644 board/st/spear13xx/spear1310evb.c create mode 100644 include/configs/spear1310-evb.h create mode 100644 include/configs/spear1310.h
MAINTAINERS +1 -0
@@ -747,6 +747,7 @@ Vipin Kumar <[email protected]> spear320 ARM926EJS (spear320 Soc) spear320-hmi ARM926EJS (spear320 SoC) spear600 ARM926EJS (spear600 Soc) + spear1310-evb ARM ARMV7 (spear1310 SoC) spear1340-evb ARM ARMV7 (spear1340 SoC) Sergey Lapin <[email protected]>
board/st/spear13xx/Makefile +1 -0
@@ -29,6 +29,7 @@ SOBJS-y := COBJS-y := COBJS-y += spear13xx_common.o +COBJS-$(CONFIG_MACH_SPEAR1310EVB) += spear1310evb.o COBJS-$(CONFIG_MACH_SPEAR1340EVB) += spear1340evb.o COBJS := $(sort $(COBJS-y))
board/st/spear13xx/spear1310evb.c new file +93 -0
93 lines not on this page · raw message
board/st/spear13xx/spear13xx_common.c +2 -0
@@ -34,6 +34,8 @@ int checkboard(void) {#ifdef CONFIG_MACH_SPEAR1340EVB printf ("BOARD: SPEAr1340-EVB\n" ); +#elif defined(CONFIG_MACH_SPEAR1310EVB ) +printf ("BOARD: SPEAr1310-EVB\n" );#else #error BOARD not supported#endif
boards.cfg +3 -0
@@ -269,6 +269,9 @@ origen arm armv7 origen samsung exynos s5pc210_universal arm armv7 universal_c210 samsung exynos smdk5250 arm armv7 smdk5250 samsung exynos smdkv310 arm armv7 smdkv310 samsung exynos +spear1310 arm armv7 spear13xx st spear13xx spear1310-evb:spear1310 +spear1310_nand arm armv7 spear13xx st spear13xx spear1310-evb:spear1310,nand +spear1310_usbtty arm armv7 spear13xx st spear13xx spear1310-evb:spear1310,usbtty spear1340 arm armv7 spear13xx st spear13xx spear1340-evb:spear1340 spear1340_nand arm armv7 spear13xx st spear13xx spear1340-evb:spear1340,nand spear1340_usbtty arm armv7 spear13xx st spear13xx spear1340-evb:spear1340,usbtty
include/configs/spear1310-evb.h new file +113 -0
113 lines not on this page · raw message
include/configs/spear1310.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __CONFIG_SPEAR1310_H +#define __CONFIG_SPEAR1310_H + +#define CONFIG_SOC_SPEAR1310 + +#if defined(CONFIG_DDR_ECC_ENABLE ) +#define CONFIG_C3 +#define CONFIG_SPL_MISC_SUPPORT +#endif + +#include <configs/spear13xx.h> +#endif /* __CONFIG_SPEAR1310_H */
Signature · 1 line
1.7.11.4
PATCH 5/7 spear1340lcad: Add support for LCAD machine
In reply to Vipin Kumar--- MAINTAINERS | 1 + board/st/spear13xx/Makefile | 1 + board/st/spear13xx/spear1340lcad.c | 89 ++++++++++++++++++++++++++++++++++ board/st/spear13xx/spear13xx_common.c | 2 + boards.cfg | 1 + include/configs/spear1340-lcad.h | 91 +++++++++++++++++++++++++++++++++++ 6 files changed, 185 insertions(+) create mode 100644 board/st/spear13xx/spear1340lcad.c create mode 100644 include/configs/spear1340-lcad.h
MAINTAINERS +1 -0
@@ -749,6 +749,7 @@ Vipin Kumar <[email protected]> spear600 ARM926EJS (spear600 Soc) spear1310-evb ARM ARMV7 (spear1310 SoC) spear1340-evb ARM ARMV7 (spear1340 SoC) + spear1340-lcad ARM ARMV7 (spear1340 SoC) Sergey Lapin <[email protected]>
board/st/spear13xx/Makefile +1 -0
@@ -31,6 +31,7 @@ COBJS-y := COBJS-y += spear13xx_common.o COBJS-$(CONFIG_MACH_SPEAR1310EVB) += spear1310evb.o COBJS-$(CONFIG_MACH_SPEAR1340EVB) += spear1340evb.o +COBJS-$(CONFIG_MACH_SPEAR1340LCAD) += spear1340lcad.o COBJS := $(sort $(COBJS-y)) SOBJS := $(sort $(SOBJS-y))
board/st/spear13xx/spear1340lcad.c new file +89 -0
89 lines not on this page · raw message
board/st/spear13xx/spear13xx_common.c +2 -0
@@ -36,6 +36,8 @@ int checkboard(void)printf ("BOARD: SPEAr1340-EVB\n" );#elif defined(CONFIG_MACH_SPEAR1310EVB )printf ("BOARD: SPEAr1310-EVB\n" ); +#elif defined(CONFIG_MACH_SPEAR1340LCAD ) +printf ("BOARD: SPEAr1340-LCAD\n" );#else #error BOARD not supported#endif
boards.cfg +1 -0
@@ -275,6 +275,7 @@ spear1310_usbtty arm armv7 spear13xx st spear1340 arm armv7 spear13xx st spear13xx spear1340-evb:spear1340 spear1340_nand arm armv7 spear13xx st spear13xx spear1340-evb:spear1340,nand spear1340_usbtty arm armv7 spear13xx st spear13xx spear1340-evb:spear1340,usbtty +spear1340lcad arm armv7 spear13xx st spear13xx spear1340-lcad:spear1340 trats arm armv7 trats samsung exynos harmony arm armv7:arm720t harmony nvidia tegra20 seaboard arm armv7:arm720t seaboard nvidia tegra20
include/configs/spear1340-lcad.h new file +91 -0
91 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 6/7 spear1340evb: Add SPL support
In reply to Vipin KumarThis patch adds SPL support for spear1340-evb. The major piece of code is addition of
* system initialization code
* ddr driver code
This patch also factors the code for spear13xx and board support etc. In other words, it also paves way for other spear13xx architecture based SoCs and other boards based on spear1340
The source of the original code is git at git.bri.st.com:/spear/xloader.git
Another change is the way xloader runs, xloader now returns to BootROM for all cases. The return value determines how the next level bootloader will be booted.
--- arch/arm/cpu/armv7/Makefile | 6 + arch/arm/cpu/armv7/spear13xx/Makefile | 26 +- arch/arm/cpu/armv7/spear13xx/spear13xx.c | 30 + arch/arm/cpu/armv7/spear13xx/spl-boot.c | 76 +++ arch/arm/cpu/armv7/spear13xx/spl-lvl_gatetrn.c | 239 ++++++++ arch/arm/cpu/armv7/spear13xx/spl-lvl_read.c | 229 ++++++++ arch/arm/cpu/armv7/spear13xx/spl-lvl_write.c | 608 +++++++++++++++++++++ arch/arm/cpu/armv7/spear13xx/spl-spear1340.c | 210 +++++++ arch/arm/cpu/armv7/spear13xx/spl-spear13xx.c | 162 ++++++ arch/arm/cpu/armv7/spear13xx/spl-swlvl.c | 93 ++++ arch/arm/cpu/armv7/spear13xx/start.S | 137 +++++ arch/arm/cpu/armv7/spear13xx/u-boot-spl.lds | 45 ++ arch/arm/cpu/armv7/spear13xx/wakeup.S | 60 ++ arch/arm/include/asm/arch-spear13xx/boot.h | 106 ++++ arch/arm/include/asm/arch-spear13xx/generic.h | 8 + arch/arm/include/asm/arch-spear13xx/mpmc.h | 332 +++++++++++ .../include/asm/arch-spear13xx/spear1340_misc.h | 76 ++- arch/arm/include/asm/arch-spear13xx/spear13xx.h | 4 + board/st/spear13xx/Makefile | 5 + board/st/spear13xx/config.mk | 4 + board/st/spear13xx/ddr/Makefile | 64 +++ board/st/spear13xx/ddr/h5tq2g63bfr_pbc_400_cl6.c | 238 ++++++++ board/st/spear13xx/ddr/h5tq2g63bfr_pbc_533_cl8.c | 238 ++++++++ board/st/spear13xx/ddr/k4b2g1646c_k0_400_cl6.c | 238 ++++++++ board/st/spear13xx/ddr/k4b2g1646c_k0_533_cl8.c | 238 ++++++++ .../ddr/mt41j128m16_15e_400_cl6_dqs_dq_term_en.c | 238 ++++++++ .../ddr/mt41j256m8187e_400_cl6_dqs_dq_term_en.c | 246 +++++++++ .../ddr/mt41j256m8187e_533_cl7_dqs_dq_term_en.c | 246 +++++++++ .../ddr/mt41j64m16_15e_400_cl6_dqs_dq_term_en.c | 238 ++++++++ .../ddr/mt41j64m16_15e_533_cl7_dqs_dq_term_en.c | 238 ++++++++ .../spear13xx/ddr/mt47h128m16rt187e_400_cl6_ddr2.c | 239 ++++++++ .../spear13xx/ddr/mt47h128m16rt187e_533_cl7_ddr2.c | 239 ++++++++ board/st/spear13xx/spl-spear1340evb.c | 57 ++ include/configs/spear1340-evb.h | 5 + include/configs/spear13xx.h | 51 +- spl/Makefile | 6 + 36 files changed, 5245 insertions(+), 30 deletions(-) create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-boot.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-lvl_gatetrn.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-lvl_read.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-lvl_write.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-spear1340.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-spear13xx.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-swlvl.c create mode 100644 arch/arm/cpu/armv7/spear13xx/start.S create mode 100644 arch/arm/cpu/armv7/spear13xx/u-boot-spl.lds create mode 100644 arch/arm/cpu/armv7/spear13xx/wakeup.S create mode 100644 arch/arm/include/asm/arch-spear13xx/boot.h create mode 100644 arch/arm/include/asm/arch-spear13xx/mpmc.h create mode 100644 board/st/spear13xx/ddr/Makefile create mode 100644 board/st/spear13xx/ddr/h5tq2g63bfr_pbc_400_cl6.c create mode 100644 board/st/spear13xx/ddr/h5tq2g63bfr_pbc_533_cl8.c create mode 100644 board/st/spear13xx/ddr/k4b2g1646c_k0_400_cl6.c create mode 100644 board/st/spear13xx/ddr/k4b2g1646c_k0_533_cl8.c create mode 100644 board/st/spear13xx/ddr/mt41j128m16_15e_400_cl6_dqs_dq_term_en.c create mode 100644 board/st/spear13xx/ddr/mt41j256m8187e_400_cl6_dqs_dq_term_en.c create mode 100644 board/st/spear13xx/ddr/mt41j256m8187e_533_cl7_dqs_dq_term_en.c create mode 100644 board/st/spear13xx/ddr/mt41j64m16_15e_400_cl6_dqs_dq_term_en.c create mode 100644 board/st/spear13xx/ddr/mt41j64m16_15e_533_cl7_dqs_dq_term_en.c create mode 100644 board/st/spear13xx/ddr/mt47h128m16rt187e_400_cl6_ddr2.c create mode 100644 board/st/spear13xx/ddr/mt47h128m16rt187e_533_cl7_ddr2.c create mode 100644 board/st/spear13xx/spl-spear1340evb.c
arch/arm/cpu/armv7/Makefile +6 -0
@@ -37,6 +37,12 @@ ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA20),) SOBJS-y += lowlevel_init.o endif +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_NO_CPU_SUPPORT_CODE +START := +endif +endif + COBJS := $(sort $(COBJS-y)) SOBJS := $(sort $(SOBJS-y)) SRCS := $(START:.o=.S) $(COBJS:.o=.c)
arch/arm/cpu/armv7/spear13xx/Makefile +22 -4
@@ -28,19 +28,37 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o +SOBJS-y := +COBJS-y := + COBJS-$(CONFIG_ARCH_SPEAR13XX) += spear13xx.o COBJS-$(CONFIG_SOC_SPEAR1310) += spear1310.o COBJS-$(CONFIG_SOC_SPEAR1310) += spear1310-pinmux.o COBJS-$(CONFIG_SOC_SPEAR1340) += spear1340.o COBJS-$(CONFIG_SOC_SPEAR1340) += spear1340-pinmux.o -SRCS := $(COBJS-y:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS-y)) +ifdef CONFIG_SPL_BUILD +SOBJS-y += wakeup.o + +COBJS-y += spl-boot.o +COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-spear13xx.o +COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-lvl_gatetrn.o +COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-lvl_read.o +COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-lvl_write.o +COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-swlvl.o +COBJS-$(CONFIG_SOC_SPEAR1340) += spl-spear1340.o +endif + +COBJS := $(sort $(COBJS-y)) +SOBJS := $(sort $(SOBJS-y)) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) all: $(obj).depend $(LIB) -$(LIB): $(OBJS) - $(call cmd_link_o_target, $(OBJS)) +$(LIB): $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) #########################################################################
arch/arm/cpu/armv7/spear13xx/spear13xx.c +30 -0
@@ -30,3 +30,33 @@ void enable_caches(void)dcache_enable ();#endif } + +#ifdef CONFIG_POST +int arch_memory_test_prepare (u32 *vstart,u32 *size,phys_addr_t *phys_offset) +{ +/* +* Run the POST test on 64 MB memory starting from CONFIG_SYS_LOAD_ADDR +* The assumption here is that the DDR present on board is >= 128MB. +* +* The test runs before relocation (after the code copy has taken +* place), so it can not touch either before or after relocation areas +* of U-boot +* +* DDR usage +* <--------->|<---------------- / --------------->|<----------> +* U-boot Area to be used for U-boot +* before POST test after +* relocation relocation +*/ + + *vstart =CONFIG_SYS_LOAD_ADDR ; + *size =64 <<20 ; + +return 0 ; +} + +void arch_memory_failure_handle (void ) +{ +hang (); +} +#endif
arch/arm/cpu/armv7/spear13xx/spl-boot.c new file +76 -0
76 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spl-lvl_gatetrn.c new file +239 -0
239 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spl-lvl_read.c new file +229 -0
229 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spl-lvl_write.c new file +608 -0
608 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spl-spear1340.c new file +210 -0
210 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spl-spear13xx.c new file +162 -0
162 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/spl-swlvl.c new file +93 -0
93 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/start.S new file +137 -0
137 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/u-boot-spl.lds new file +45 -0
45 lines not on this page · raw message
arch/arm/cpu/armv7/spear13xx/wakeup.S new file +60 -0
60 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/boot.h new file +106 -0
106 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/generic.h +8 -0
@@ -30,4 +30,12 @@ extern void spear1310_usbh_stop(void);extern void spear1340_usbh_stop (void );#endif +#if defined(CONFIG_SPL_BUILD ) +extern void cpu2_wake (void ); +extern void soc_init (void ); +extern void board_pre_ddrinit (void ); +extern void ddr_init (void ); +extern void board_post_ddrinit (void ); +#endif +#endif
arch/arm/include/asm/arch-spear13xx/mpmc.h new file +332 -0
332 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/spear1340_misc.h +51 -25
107 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/spear13xx.h +4 -0
@@ -26,6 +26,10 @@#define CONFIG_SPEAR_CORTEXBASE 0xEC800000#define CONFIG_ARMV7_LTIMER_BASE (CONFIG_SPEAR_CORTEXBASE + 0x600) +#define CONFIG_SYS_L2CACHE_BASE 0xED000000 + +#define CONFIG_SYS_MPMC_BASE 0xEC000000 +#define CONFIG_SPEAR_MPMCREGS 208#define CONFIG_SYS_C3_BASE 0xE1800000#define CONFIG_SYS_USBD_BASE 0xE3800000
board/st/spear13xx/Makefile +5 -0
@@ -28,10 +28,15 @@ LIB = $(obj)lib$(BOARD).o SOBJS-y := COBJS-y := +ifdef CONFIG_SPL_BUILD +COBJS-$(CONFIG_MACH_SPEAR1310EVB) += spl-spear1310evb.o +COBJS-$(CONFIG_MACH_SPEAR1340EVB) += spl-spear1340evb.o +else COBJS-y += spear13xx_common.o COBJS-$(CONFIG_MACH_SPEAR1310EVB) += spear1310evb.o COBJS-$(CONFIG_MACH_SPEAR1340EVB) += spear1340evb.o COBJS-$(CONFIG_MACH_SPEAR1340LCAD) += spear1340lcad.o +endif COBJS := $(sort $(COBJS-y)) SOBJS := $(sort $(SOBJS-y))
board/st/spear13xx/config.mk +4 -0
@@ -23,4 +23,8 @@ ifndef CONFIG_SPL_BUILD ALL-y += $(obj)u-boot.img + +ifdef CONFIG_MACH_SPEAR1340EVB +ALL-y += $(obj)spl/u-boot-spl.img +endif endif
board/st/spear13xx/ddr/Makefile new file +64 -0
64 lines not on this page · raw message
board/st/spear13xx/ddr/h5tq2g63bfr_pbc_400_cl6.c new file +238 -0
238 lines not on this page · raw message
board/st/spear13xx/ddr/h5tq2g63bfr_pbc_533_cl8.c new file +238 -0
163 lines not on this page · raw message
board/st/spear13xx/ddr/k4b2g1646c_k0_400_cl6.c new file +238 -0
238 lines not on this page · raw message
board/st/spear13xx/ddr/k4b2g1646c_k0_533_cl8.c new file +238 -0
238 lines not on this page · raw message
board/st/spear13xx/ddr/mt41j128m16_15e_400_cl6_dqs_dq_term_en.c new file +238 -0
238 lines not on this page · raw message
board/st/spear13xx/ddr/mt41j256m8187e_400_cl6_dqs_dq_term_en.c new file +246 -0
246 lines not on this page · raw message
board/st/spear13xx/ddr/mt41j256m8187e_533_cl7_dqs_dq_term_en.c new file +246 -0
246 lines not on this page · raw message
board/st/spear13xx/ddr/mt41j64m16_15e_400_cl6_dqs_dq_term_en.c new file +238 -0
238 lines not on this page · raw message
board/st/spear13xx/ddr/mt41j64m16_15e_533_cl7_dqs_dq_term_en.c new file +238 -0
238 lines not on this page · raw message
board/st/spear13xx/ddr/mt47h128m16rt187e_400_cl6_ddr2.c new file +239 -0
239 lines not on this page · raw message
board/st/spear13xx/ddr/mt47h128m16rt187e_533_cl7_ddr2.c new file +239 -0
239 lines not on this page · raw message
board/st/spear13xx/spl-spear1340evb.c new file +57 -0
57 lines not on this page · raw message
include/configs/spear13xx.h +50 -1
51 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.11.4
Part of the diff is not shown here. View the raw message.
PATCH 7/7 spear1310evb: Add SPL support
In reply to Vipin KumarEnable SPL support for spear1310evb board. The spl binaries are generated in $(obj)/spl directory.
--- arch/arm/cpu/armv7/spear13xx/Makefile | 1 + arch/arm/cpu/armv7/spear13xx/spl-spear1310.c | 230 +++++++++++++++++++++ .../include/asm/arch-spear13xx/spear1310_misc.h | 100 +++++++-- board/st/spear13xx/config.mk | 3 - board/st/spear13xx/spl-spear1310evb.c | 50 +++++ include/configs/spear1310-evb.h | 5 + spl/Makefile | 1 + 7 files changed, 366 insertions(+), 24 deletions(-) create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-spear1310.c create mode 100644 board/st/spear13xx/spl-spear1310evb.c
arch/arm/cpu/armv7/spear13xx/Makefile +1 -0
@@ -47,6 +47,7 @@ COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-lvl_read.o COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-lvl_write.o COBJS-$(CONFIG_ARCH_SPEAR13XX) += spl-swlvl.o COBJS-$(CONFIG_SOC_SPEAR1340) += spl-spear1340.o +COBJS-$(CONFIG_SOC_SPEAR1310) += spl-spear1310.o endif COBJS := $(sort $(COBJS-y))
arch/arm/cpu/armv7/spear13xx/spl-spear1310.c new file +230 -0
230 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/spear1310_misc.h +79 -21
137 lines not on this page · raw message
board/st/spear13xx/config.mk +0 -3
@@ -23,8 +23,5 @@ ifndef CONFIG_SPL_BUILD ALL-y += $(obj)u-boot.img - -ifdef CONFIG_MACH_SPEAR1340EVB ALL-y += $(obj)spl/u-boot-spl.img endif -endif
board/st/spear13xx/spl-spear1310evb.c new file +50 -0
50 lines not on this page · raw message
include/configs/spear1310-evb.h +5 -0
@@ -81,6 +81,11 @@#define CONFIG_NAND_FSMC #define CONFIG_SYS_FSMC_NAND_8BIT +/* SPL support */ +#define CONFIG_SPL +#define CONFIG_DDR_MT41J256M8 +#define CONFIG_SPEAR_DDRFREQ533 +/* Environment Variable configs */ #if defined(CONFIG_ENV_IS_IN_FLASH )/* Environment is in serial NOR flash */
spl/Makefile +1 -0
@@ -47,6 +47,7 @@ LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/libcommon.o LIBS-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/libdisk.o LIBS-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/libi2c.o LIBS-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/libgpio.o +LIBS-$(CONFIG_SPL_MISC_SUPPORT) += drivers/misc/c3.o LIBS-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/libmmc.o LIBS-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/libserial.o LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/libspi_flash.o
Signature · 1 line
1.7.11.4
PATCH 1/9 spear: Add cache support
In reply to a message not in the archive--- arch/arm/cpu/arm926ejs/spear/Makefile | 7 ++++--- arch/arm/cpu/arm926ejs/spear/cache.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/cache.c
arch/arm/cpu/arm926ejs/spear/Makefile +4 -3
@@ -25,9 +25,10 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o -COBJS-y := cpu.o \ - reset.o \ - timer.o +COBJS-y += cache.o +COBJS-y += cpu.o +COBJS-y += reset.o +COBJS-y += timer.o COBJS-$(CONFIG_ST_EMI) += emi.o COBJS-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o
arch/arm/cpu/arm926ejs/spear/cache.c new file +32 -0
@@ -0,0 +1,32 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Micoelectronics, vipin.kumar at st.com. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +void enable_caches (void ) +{ +#ifndef CONFIG_SYS_DCACHE_OFF +/* Enable D-cache. I-cache is already enabled in start.S */ +dcache_enable (); +#endif +}
Signature · 1 line
1.7.11.4
PATCH 2/9 spear3xx: Add pinmux support
The pinmux layer for spear family of devices exports three APIs for the board. <soc>_pins_default:
This routine puts all the SoC pins in a default (safe) state. This API can be used by the respective boards to place all pins in a safe mode before going ahead with initializing with pinmux
<soc>_select_mode:
This routine selects a particular SoC mode. It is particularly for those SoCs which have several modes one of which can be selected. spear300 and spear320 are such SoCs.
<soc>_enable_pins:
This routine enables the desired pins. It accepts two arguments. First is 'ip' which indicates which controller pins are to be enabled and the second is 'mode' in which this ip has to run eg. ip can be PMX_ETH0 and mode can be PMX_ETH_RGMII/PMX_ETH_MII etc
<soc> spear320_configure_pin:
Configures the selected pin in GPIO, PULLDOWN/PULLUP mode
<soc>_plgpio_get:
Gets the value at a particular GPIO
<soc>_plgpio_set(u32 plgpio, u32 val)
Sets the value at a particular GPIO
Additionally, this patch also defines mdio_get_control for spear3xx which also falls in the purview of pinmux. This is defined because spear310 and spear320 devices need to control mdio lines dynamically because these are shared. Define the mdio_get_control routine to achieve this.
--- arch/arm/cpu/arm926ejs/spear/Makefile | 6 +- arch/arm/cpu/arm926ejs/spear/spear300.c | 140 +++++ arch/arm/cpu/arm926ejs/spear/spear310.c | 162 ++++++ arch/arm/cpu/arm926ejs/spear/spear320.c | 860 +++++++++++++++++++++++++++++ arch/arm/cpu/arm926ejs/spear/spear3xx.c | 87 +++ arch/arm/include/asm/arch-spear/pinmux.h | 133 +++++ arch/arm/include/asm/arch-spear/spear300.h | 27 + arch/arm/include/asm/arch-spear/spear310.h | 13 + arch/arm/include/asm/arch-spear/spear320.h | 426 ++++++++++++++ arch/arm/include/asm/arch-spear/spear3xx.h | 22 + board/st/spear/spear300evb.c | 19 + board/st/spear/spear310evb.c | 16 + board/st/spear/spear320plc.c | 38 +- board/st/spear/spear600evb.c | 7 + 14 files changed, 1949 insertions(+), 7 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/spear300.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear310.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear320.c create mode 100644 arch/arm/include/asm/arch-spear/pinmux.h
arch/arm/cpu/arm926ejs/spear/Makefile +4 -2
@@ -32,6 +32,9 @@ COBJS-y += timer.o COBJS-$(CONFIG_ST_EMI) += emi.o COBJS-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o +COBJS-$(CONFIG_SOC_SPEAR300) += spear300.o +COBJS-$(CONFIG_SOC_SPEAR310) += spear310.o +COBJS-$(CONFIG_SOC_SPEAR320) += spear320.o COBJS-$(CONFIG_ARCH_SPEAR6XX) += spear6xx.o ifdef CONFIG_SPL_BUILD
@@ -39,9 +42,8 @@ COBJS-y += spl.o spl_boot.o COBJS-$(CONFIG_SOC_SPEAR600) += spl-spear600.o endif -SRCS := $(START:.o=.S) $(COBJS-y:.o=.c) +SRCS := $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y)) -START := $(addprefix $(obj),$(START)) all: $(obj).depend $(LIB)
arch/arm/cpu/arm926ejs/spear/spear300.c new file +140 -0
140 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spear310.c new file +162 -0
162 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spear320.c new file +860 -0
860 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spear3xx.c +87 -0
93 lines not on this page · raw message
arch/arm/include/asm/arch-spear/pinmux.h new file +133 -0
133 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spear300.h +27 -0
@@ -30,4 +30,31 @@#define CONFIG_SYS_NAND_CLE (1 << 16)#define CONFIG_SYS_NAND_ALE (1 << 17) +/* RAS misc registers and respective bitmasks */ +#define CONFIG_SYS_RAS_BASE 0x99000000 +#define SPEAR300_RAS_REG1 CONFIG_SYS_RAS_BASE +/* Bitmaks for REG1 are in spear3xx.h */ +#define SPEAR300_RAS_REG2 (CONFIG_SYS_RAS_BASE + 0x04) +#define SPEAR300_MODE_MSK (0xF << 0) +#define SPEAR300_MODE_NAND (0x0 << 0) +#define SPEAR300_MODE_NOR (0x1 << 0) +#define SPEAR300_MODE_PHOTOFRAME (0x2 << 0) +#define SPEAR300_MODE_LENDIPFONE (0x3 << 0) +#define SPEAR300_MODE_HENDIPFONE (0x4 << 0) +#define SPEAR300_MODE_LENDWIFIFONE (0x5 << 0) +#define SPEAR300_MODE_HENDWIFIFONE (0x6 << 0) +#define SPEAR300_MODE_ATAPABXWI2S (0x7 << 0) +#define SPEAR300_MODE_ATAPABXI2S (0x8 << 0) +#define SPEAR300_MODE_CAM1LCDW (0xC << 0) +#define SPEAR300_MODE_CAMULCD (0xD << 0) +#define SPEAR300_MODE_CAMULCDW (0xE << 0) +#define SPEAR300_MODE_CAM1LCD (0xF << 0) + +#define SPEAR3XX_FUNC_ENB_REG SPEAR300_RAS_REG1 + +/* externs related to pinmux */ +extern void spear300_pins_default (void ); +extern void spear300_select_mode (u32 mode); +extern void spear300_enable_pins (u32 ip,u32 mode); +#endif
arch/arm/include/asm/arch-spear/spear310.h +13 -0
@@ -37,4 +37,17 @@#define CONFIG_SYS_MACB3_BASE 0xB1800000#define CONFIG_SPEAR_RASBASE 0xB4000000 +/* SPEAr310 RAS misc space registers and bitmasks */ +#define SPEAR310_FUNCENB_REG (CONFIG_SPEAR_RASBASE + 0x8) + +#define SPEAR310_SMII_REG (CONFIG_SPEAR_RASBASE + 0xC) +#define SPEAR310_SMII_PHY_SHIFT 0x0 +#define SPEAR310_SMII_PHY_MASK 0x3 + +#define SPEAR3XX_FUNC_ENB_REG SPEAR310_FUNCENB_REG + +/* externs related to pinmux */ +extern void spear310_pins_default (void ); +extern void spear310_enable_pins (u32 ip,u32 mode); +#endif
arch/arm/include/asm/arch-spear/spear320.h +426 -0
430 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spear3xx.h +22 -0
@@ -37,4 +37,26 @@#define CONFIG_SPEAR_SYSCNTLBASE 0xFCA00000#define CONFIG_SPEAR_MISCBASE 0xFCA80000 +/* spear3xx pinmux register and related bit masks */ +#define PMX_FIRDA_MASK (1 << 14) +#define PMX_I2C_MASK (1 << 13) +#define PMX_SSP_CS_MASK (1 << 12) +#define PMX_SSP_MASK (1 << 11) +#define PMX_MII_MASK (1 << 10) +#define PMX_GPIO_PIN0_MASK (1 << 9) +#define PMX_GPIO_PIN1_MASK (1 << 8) +#define PMX_GPIO_PIN2_MASK (1 << 7) +#define PMX_GPIO_PIN3_MASK (1 << 6) +#define PMX_GPIO_PIN4_MASK (1 << 5) +#define PMX_GPIO_PIN5_MASK (1 << 4) +#define PMX_UART0_MODEM_MASK (1 << 3) +#define PMX_UART0_MASK (1 << 2) +#define PMX_TIMER_2_3_MASK (1 << 1) +#define PMX_TIMER_0_1_MASK (1 << 0) + +#define SPEAR3XX_MAX_PLGPIOS 101 + +/* externs related to pinmux */ +extern void spear3xx_enable_pins (u32 ip,u32 mode); +#endif
board/st/spear/spear300evb.c +19 -0
@@ -30,11 +30,30 @@#include <asm/arch/hardware.h> #include <asm/arch/generic.h> #include <asm/arch/misc.h> +#include <asm/arch/pinmux.h> #if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];#endif +#if defined(CONFIG_BOARD_EARLY_INIT_F ) +int board_early_init_f (void ) +{ +spear300_select_mode (SPEAR300_MODE_NAND ); + +spear300_pins_default (); +spear3xx_enable_pins (PMX_I2C0 ,0 ); +spear3xx_enable_pins (PMX_SSP0 ,0 ); +spear3xx_enable_pins (PMX_ETH0 ,0 ); +spear3xx_enable_pins (PMX_UART0 ,PMX_UART_SIMPLE ); + +spear300_enable_pins (PMX_SDMMC ,PMX_SDMMC_4BIT ); +spear300_enable_pins (PMX_FSMCNAND ,PMX_NAND_2CHIP ); + +return 0 ; +} +#endif +#if defined(CONFIG_CMD_NAND )/* * board_nand_init - Board specific NAND initialization
board/st/spear/spear310evb.c +16 -0
@@ -31,11 +31,27 @@#include <asm/arch/hardware.h> #include <asm/arch/generic.h> #include <asm/arch/misc.h> +#include <asm/arch/pinmux.h> #if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];#endif +#if defined(CONFIG_BOARD_EARLY_INIT_F ) +int board_early_init_f (void ) +{ +spear310_pins_default (); +spear3xx_enable_pins (PMX_I2C0 ,0 ); +spear3xx_enable_pins (PMX_SSP0 ,0 ); +spear3xx_enable_pins (PMX_ETH0 ,0 ); +spear3xx_enable_pins (PMX_UART0 ,PMX_UART_SIMPLE ); + +spear310_enable_pins (PMX_ETH1 ,0 ); + +return 0 ; +} +#endif +#if defined(CONFIG_CMD_NAND )/* * board_nand_init - Board specific NAND initialization
board/st/spear/spear320plc.c +33 -5
@@ -31,9 +31,8 @@#include <asm/arch/hardware.h> #include <asm/arch/generic.h> #include <asm/arch/misc.h> - -#define PLGPIO_SEL_36 0xb3000028 -#define PLGPIO_IO_36 0xb3000038 +#include <asm/arch/mmc.h> +#include <asm/arch/pinmux.h> #if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];
@@ -41,15 +40,44 @@ static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE];static void spear_phy_reset (void ) { -writel (0x10 ,PLGPIO_IO_36 ); -writel (0x10 ,PLGPIO_SEL_36 ); +/* GPIO36 is used to enable oscillator */ +spear320_configure_pin (36 ,PMX_GPIO ); +spear320_plgpio_set (36 ,1 ); + +/* GPIO76 is used to reset phy */ +spear320_configure_pin (76 ,PMX_GPIO ); +spear320_plgpio_set (76 ,0 ); +spear320_plgpio_set (76 ,1 ); }int board_init (void ) {spear_phy_reset (); + +return 0 ; +} + +#if defined(CONFIG_BOARD_EARLY_INIT_F ) +int board_early_init_f (void ) +{ +spear320_select_mode (SPEAR320_EXTENDED_MODE ); + +spear320_pins_default (); + +spear320_enable_pins (PMX_I2C0 ,0 ); +spear320_enable_pins (PMX_ETH0 ,0 ); +spear320_enable_pins (PMX_SSP0 ,0 ); +spear320_enable_pins (PMX_UART0 ,PMX_UART_SIMPLE ); +spear320_enable_pins (PMX_ETH2 ,PMX_ETH_MII ); +spear320_enable_pins (PMX_SDMMC ,PMX_SDMMC_CD51 ); + +/* GPIO61 is used for card power on */ +spear320_configure_pin (61 ,PMX_GPIO ); +spear320_plgpio_set (61 ,0 ); +return 0 ; } +#endif #if defined(CONFIG_CMD_NAND )/*
board/st/spear/spear600evb.c +7 -0
@@ -35,6 +35,13 @@static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];#endif +#if defined(CONFIG_BOARD_EARLY_INIT_F ) +int board_early_init_f (void ) +{ +return 0 ; +} +#endif +#if defined(CONFIG_CMD_NAND )/* * board_nand_init - Board specific NAND initialization
Signature · 1 line
1.7.11.4
PATCH 3/9 spear320plc: Correct the MACB interface
In reply to Vipin Kumar--- board/st/spear/spear320plc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
board/st/spear/spear320plc.c +2 -2
@@ -116,8 +116,8 @@ int board_eth_init(bd_t *bis) ret++;#endif #if defined(CONFIG_MACB ) -if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , -CONFIG_MACB0_PHY ) >=0 ) +if (macb_eth_initialize (1 , (void *)CONFIG_SYS_MACB1_BASE , +CONFIG_MACB1_PHY ) >=0 ) ret++;#endif return ret;
Signature · 1 line
1.7.11.4
PATCH 4/9 spear/configs: Modify several configurations
In reply to Vipin Kumar- Define CONFIG_SYS_EXCEPTION_VECTORS_HIGH
Define CONFIG_SYS_EXCEPTION_VECTORS_HIGH and remove specific initialization of CPU as high vector
- Define CONFIG_DISPLAY_BOARDINFO and print board info
- Add GPIO support
- Define CONFIG_BOOT_PARAMS_P for all spear boards
It also makes a few board_init calls redundant so remove them from the code
- Enable OTG support
- Enable SPI and SDMMC support
- Enable USBH EHCI support
- Disable caches explicitly
- Keep ATAG interface for kernel booting
The older kernel needs an ATAG interface to boot. The bootloader needs to pass the information in the form of ATAGS. Keep this ATAG interface with the new DT interface for kernel booting
- Remove extraneous configurations
--- board/st/spear/spear_common.c | 16 +++++++++ board/st/spear/spear_lowlevel_init.S | 14 -------- include/configs/spear.h | 49 +++++++++++++++++++++++++-- include/configs/spear300-evb.h | 24 ++++++++++---- include/configs/spear310-evb.h | 24 ++++++++++---- include/configs/spear320-evb.h | 64 +++++++++++------------------------- include/configs/spear600-evb.h | 32 ++++++++++++++---- 7 files changed, 141 insertions(+), 82 deletions(-)
board/st/spear/spear_common.c +16 -0
@@ -39,6 +39,22 @@ void lowlevel_init(void) { } +int checkboard (void ) +{ +#ifdef CONFIG_MACH_SPEAR300EVB +printf ("BOARD: SPEAr300-EVB\n" ); +#elif defined(CONFIG_MACH_SPEAR310EVB ) +printf ("BOARD: SPEAr310-EVB\n" ); +#elif defined(CONFIG_MACH_SPEAR320EVB ) +printf ("BOARD: SPEAr320-PLC\n" ); +#elif defined(CONFIG_MACH_SPEAR600EVB ) +printf ("BOARD: SPEAr600-EVB\n" ); +#else +#error BOARD not supported +#endif +return 0 ; +} +int dram_init (void ) {/* Store complete RAM size and return */
board/st/spear/spear_lowlevel_init.S +0 -14
@@ -23,20 +23,6 @@ #include <config.h> -/* - * platform specific initializations are already done in Xloader - * Initializations already done include - * DDR, PLLs, IP's clock enable and reset release etc - */ -.globl lowlevel_init -lowlevel_init: - /* By default, U-Boot switches CPU to low-vector */ - /* Revert this as we work in high vector even in U-Boot */ - mrc p15, 0, r0, c1, c0, 0 - orr r0, r0, #0x00002000 - mcr p15, 0, r0, c1, c0, 0 - mov pc, lr - /* void setfreq(unsigned int device, unsigned int frequency) */ .global setfreq setfreq:
include/configs/spear.h +46 -3
91 lines not on this page · raw message
include/configs/spear300-evb.h +17 -7
@@ -54,6 +54,14 @@#define CONFIG_SYS_I2C_SLAVE 0x02#endif +/* GPIO configurations */ +#define CONFIG_SPEAR_GPIO + +/* USB EHCI configurations */ +#if !defined(CONFIG_SPEAR_USBTTY ) +#define CONFIG_USB_EHCI_SPEAR +#endif +/* AMBA PL011 configurations */ #define CONFIG_PL011_SERIAL #define CONFIG_CONS_INDEX 0
@@ -74,17 +82,19 @@/* Environment is in serial NOR flash */ #define CONFIG_ENV_ADDR 0xF8060000#define CONFIG_ENV_SECT_SIZE 0x00010000 -#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock3 " -#define CONFIG_BOOTCOMMAND "bootm 0xF8070000" +#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock5 " +#define CONFIG_BOOTCOMMAND "" \ + "bootm 0xf8080000 - 0xf8070000"#elif defined(CONFIG_ENV_IS_IN_NAND )/* Environment is in NAND */ -#define CONFIG_ENV_OFFSET 0x00060000 -#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock7 " +#define CONFIG_ENV_OFFSET 0x00070000 +#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock11 " -#define CONFIG_BOOTCOMMAND "nand read.jffs2 0x1600000 " \ - "0x80000 0x4C0000; " \ - "bootm 0x1600000" +#define CONFIG_BOOTCOMMAND "" \ + "nand read.jffs2 0x800000 0x78000 0x008000; " \ + "nand read.jffs2 0x900000 0x80000 0x4C0000; " \ + "bootm 0x900000 - 0x800000"#endif #define CONFIG_BOOTARGS "console=ttyAMA0,115200 " \
include/configs/spear310-evb.h +17 -7
@@ -67,6 +67,14 @@#define CONFIG_SYS_I2C_SLAVE 0x02#endif +/* GPIO configurations */ +#define CONFIG_SPEAR_GPIO + +/* USB EHCI configurations */ +#if !defined(CONFIG_SPEAR_USBTTY ) +#define CONFIG_USB_EHCI_SPEAR +#endif +/* AMBA PL011 configurations */ #define CONFIG_PL011_SERIAL #define CONFIG_CONS_INDEX 0
@@ -105,17 +113,19 @@/* Environment is in serial NOR flash */ #define CONFIG_ENV_ADDR 0xF8060000#define CONFIG_ENV_SECT_SIZE 0x00010000 -#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock3 " -#define CONFIG_BOOTCOMMAND "bootm 0xF8050000" +#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock5 " +#define CONFIG_BOOTCOMMAND "" \ + "bootm 0xf8080000 - 0xf8070000"#endif #elif defined(CONFIG_ENV_IS_IN_NAND )/* Environment is in NAND */ -#define CONFIG_ENV_OFFSET 0x00060000 -#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock7 " +#define CONFIG_ENV_OFFSET 0x00140000 +#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock11 " -#define CONFIG_BOOTCOMMAND "nand read.jffs2 0x1600000 " \ - "0x200000 0x4C0000; " \ - "bootm 0x1600000" +#define CONFIG_BOOTCOMMAND "" \ + "nand read.jffs2 0x800000 0x180000 0x020000; " \ + "nand read.jffs2 0x900000 0x1c0000 0x4C0000; " \ + "bootm 0x900000 - 0x800000"#endif #define CONFIG_BOOTARGS "console=ttyAMA0,115200 " \
include/configs/spear320-evb.h +20 -44
86 lines not on this page · raw message
include/configs/spear600-evb.h +25 -7
@@ -41,6 +41,7 @@#if !defined(CONFIG_SPEAR_USBTTY )#define CONFIG_DESIGNWARE_ETH #define CONFIG_DW_SEARCH_PHY +#define CONFIG_PHY_GIGE #define CONFIG_DW0_PHY 1#define CONFIG_PHY_RESET_DELAY 10000/* in usec */ #define CONFIG_DW_AUTONEG
@@ -54,6 +55,14 @@#define CONFIG_SYS_I2C_SLAVE 0x02#endif +/* GPIO configurations */ +#define CONFIG_SPEAR_GPIO + +/* USB EHCI configurations */ +#if !defined(CONFIG_SPEAR_USBTTY ) +#define CONFIG_USB_EHCI_SPEAR +#endif +/* AMBA PL011 configurations */ #define CONFIG_PL011_SERIAL #define CONFIG_CONS_INDEX 0
@@ -70,21 +79,30 @@/* ST SMI (Serial flash) configurations */ #define CONFIG_ST_SMI +/* SPL support */ +#define CONFIG_SPL +#define CONFIG_SPEAR_DDR_2HCLK +#define CONFIG_DDR_MT47H32M16 +#define CONFIG_SPL_TEXT_BASE 0xD2800B00 +#define CONFIG_SYS_SNOR_BOOT_BASE 0xF8010000 +#if defined(CONFIG_ENV_IS_IN_FLASH )/* Environment is in serial NOR flash */ #define CONFIG_ENV_ADDR 0xF8060000#define CONFIG_ENV_SECT_SIZE 0x00010000 -#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock3 " -#define CONFIG_BOOTCOMMAND "bootm 0xF8060000" +#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock5 " +#define CONFIG_BOOTCOMMAND "" \ + "bootm 0xf8080000 - 0xf8070000"#elif defined(CONFIG_ENV_IS_IN_NAND )/* Environment is in NAND */ -#define CONFIG_ENV_OFFSET 0x00060000 -#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock7 " +#define CONFIG_ENV_OFFSET 0x00140000 +#define CONFIG_SPEAR_ROOTFSBLK "/dev/mtdblock11 " -#define CONFIG_BOOTCOMMAND "nand read.jffs2 0x1600000 " \ - "0x80000 0x4C0000; " \ - "bootm 0x1600000" +#define CONFIG_BOOTCOMMAND "" \ + "nand read.jffs2 0x800000 0x180000 0x020000; " \ + "nand read.jffs2 0x900000 0x1c0000 0x4C0000; " \ + "bootm 0x900000 - 0x800000"#endif #define CONFIG_BOOTARGS "console=ttyAMA0,115200 " \
Signature · 1 line
1.7.11.4
PATCH 5/9 spear320: Add support for SD/MMC
In reply to Vipin Kumar--- arch/arm/include/asm/arch-spear/mmc.h | 29 +++++++++++++++++++++++++++++ arch/arm/include/asm/arch-spear/spear320.h | 1 + board/st/spear/spear320plc.c | 12 ++++++++++++ include/configs/spear320-evb.h | 5 +++++ 4 files changed, 47 insertions(+) create mode 100644 arch/arm/include/asm/arch-spear/mmc.h
arch/arm/include/asm/arch-spear/mmc.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Micoelectronics, vipin.kumar at st.com. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARCH_MMC_H +#define _ASM_ARCH_MMC_H + +extern int spear_sdhci_init (u32 regbase,u32 max_clk,u32 min_clk,u32 quirks); + +#endif
arch/arm/include/asm/arch-spear/spear320.h +1 -0
@@ -31,6 +31,7 @@#define CONFIG_SYS_NAND_CLE (1 << 16)#define CONFIG_SYS_NAND_ALE (1 << 17) +#define CONFIG_SYS_MMC_BASE 0x70000000#define CONFIG_SYS_MACB0_BASE 0xAA000000#define CONFIG_SYS_MACB1_BASE 0xAB000000#define CONFIG_SPEAR_RASBASE 0xB3000000
board/st/spear/spear320plc.c +12 -0
@@ -123,3 +123,15 @@ int board_eth_init(bd_t *bis) return ret; }#endif + +#if defined(CONFIG_CMD_MMC ) +int board_mmc_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_SPEAR_SDHCI ) +if (spear_sdhci_init (CONFIG_SYS_MMC_BASE ,24000000 ,6000000 ,0 ) >=0 ) + ret++; +#endif +return ret; +} +#endif
include/configs/spear320-evb.h +5 -0
@@ -33,6 +33,11 @@#define CONFIG_MACH_SPEAR320EVB #define CONFIG_MACH_TYPE MACH_TYPE_SPEAR320 +/* ARASAN SD MMC configuration */ +#if !defined(CONFIG_SPEAR_USBTTY ) +#define CONFIG_SPEAR_SDHCI +#endif +/* Designware Ethernet configurations */ #if !defined(CONFIG_SPEAR_USBTTY )#define CONFIG_DESIGNWARE_ETH
Signature · 1 line
1.7.11.4
PATCH 6/9 spear320-hmi: Add support for hmi machine
In reply to Vipin Kumar--- MAINTAINERS | 1 + board/st/spear/Makefile | 1 + board/st/spear/spear320hmi.c | 120 +++++++++++++++++++++++++++++++++++++++++ board/st/spear/spear_common.c | 2 + boards.cfg | 2 + include/configs/spear320-hmi.h | 117 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 243 insertions(+) create mode 100644 board/st/spear/spear320hmi.c create mode 100644 include/configs/spear320-hmi.h
MAINTAINERS +1 -0
@@ -745,6 +745,7 @@ Vipin Kumar <[email protected]> spear300 ARM926EJS (spear300 Soc) spear310 ARM926EJS (spear310 Soc) spear320 ARM926EJS (spear320 Soc) + spear320-hmi ARM926EJS (spear320 SoC) spear600 ARM926EJS (spear600 Soc) Sergey Lapin <[email protected]>
board/st/spear/Makefile +1 -0
@@ -38,6 +38,7 @@ endif COBJS-$(CONFIG_MACH_SPEAR300EVB) += spear300evb.o COBJS-$(CONFIG_MACH_SPEAR310EVB) += spear310evb.o COBJS-$(CONFIG_MACH_SPEAR320EVB) += spear320plc.o +COBJS-$(CONFIG_MACH_SPEAR320HMI) += spear320hmi.o COBJS-$(CONFIG_MACH_SPEAR600EVB) += spear600evb.o COBJS := $(sort $(COBJS-y))
board/st/spear/spear320hmi.c new file +120 -0
120 lines not on this page · raw message
board/st/spear/spear_common.c +2 -0
@@ -47,6 +47,8 @@ int checkboard(void)printf ("BOARD: SPEAr310-EVB\n" );#elif defined(CONFIG_MACH_SPEAR320EVB )printf ("BOARD: SPEAr320-PLC\n" ); +#elif defined(CONFIG_MACH_SPEAR320HMI ) +printf ("BOARD: SPEAr320-HMI\n" );#elif defined(CONFIG_MACH_SPEAR600EVB )printf ("BOARD: SPEAr600-EVB\n" );#else
boards.cfg +2 -0
@@ -210,6 +210,8 @@ spear320 arm arm926ejs spear st spear320_pnor arm arm926ejs spear st spear spear320-evb:spear320,pnor spear320_nand arm arm926ejs spear st spear spear320-evb:spear320,nand spear320_usbtty arm arm926ejs spear st spear spear320-evb:spear320,usbtty +spear320_hmi arm arm926ejs spear st spear spear320-hmi:spear320 +spear320_hmi_nand arm arm926ejs spear st spear spear320-hmi:spear320,nand spear600 arm arm926ejs spear st spear spear600-evb:spear600 spear600_nand arm arm926ejs spear st spear spear600-evb:spear600,nand spear600_usbtty arm arm926ejs spear st spear spear600-evb:spear600,usbtty
include/configs/spear320-hmi.h new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 7/9 spear6xx/spear3xx: Add support to boot via NAND device
In reply to Vipin KumarAdd support for nand boot to SPL meant for spear3xx/spear6xx based boards
--- arch/arm/cpu/arm926ejs/spear/Makefile | 2 +- arch/arm/cpu/arm926ejs/spear/spl_boot.c | 44 +++++- arch/arm/cpu/arm926ejs/spear/spl_nand.c | 121 ++++++++++++++++ arch/arm/include/asm/arch-spear/bootrom_table.h | 54 +++++++ arch/arm/include/asm/arch-spear/spl_nand.h | 181 ++++++++++++++++++++++++ include/configs/spear600-evb.h | 1 + 6 files changed, 400 insertions(+), 3 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/spl_nand.c create mode 100644 arch/arm/include/asm/arch-spear/bootrom_table.h create mode 100644 arch/arm/include/asm/arch-spear/spl_nand.h
arch/arm/cpu/arm926ejs/spear/Makefile +1 -1
@@ -38,7 +38,7 @@ COBJS-$(CONFIG_SOC_SPEAR320) += spear320.o COBJS-$(CONFIG_ARCH_SPEAR6XX) += spear6xx.o ifdef CONFIG_SPL_BUILD -COBJS-y += spl.o spl_boot.o +COBJS-y += spl.o spl_boot.o spl_nand.o COBJS-$(CONFIG_SOC_SPEAR600) += spl-spear600.o endif
arch/arm/cpu/arm926ejs/spear/spl_boot.c +42 -2
62 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spl_nand.c new file +121 -0
121 lines not on this page · raw message
arch/arm/include/asm/arch-spear/bootrom_table.h new file +54 -0
54 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spl_nand.h new file +181 -0
181 lines not on this page · raw message
include/configs/spear600-evb.h +1 -0
@@ -85,6 +85,7 @@#define CONFIG_DDR_MT47H32M16 #define CONFIG_SPL_TEXT_BASE 0xD2800B00#define CONFIG_SYS_SNOR_BOOT_BASE 0xF8010000 +#define CONFIG_SYS_NAND_BOOT_BLK 4#if defined(CONFIG_ENV_IS_IN_FLASH )/* Environment is in serial NOR flash */
Signature · 1 line
1.7.11.4
PATCH 8/9 spear/spl: Add support to boot from Parallel NOR device
In reply to Vipin KumarParallel NOR boot is supported by all spear3xx devices. This patch adds the support to the generic spear spl framework.
--- arch/arm/cpu/arm926ejs/spear/spl_boot.c | 79 +++++++++++++++++++++++++++++- arch/arm/include/asm/arch-spear/generic.h | 6 --- arch/arm/include/asm/arch-spear/spl_pnor.h | 34 +++++++++++++ include/configs/spear600-evb.h | 1 + 4 files changed, 113 insertions(+), 7 deletions(-) create mode 100644 arch/arm/include/asm/arch-spear/spl_pnor.h
arch/arm/cpu/arm926ejs/spear/spl_boot.c +78 -1
@@ -31,6 +31,7 @@#include <asm/arch/hardware.h> #include <asm/arch/generic.h> #include <asm/arch/spl_nand.h> +#include <asm/arch/spl_pnor.h> uint32_t crc32 (uint32_t ,const unsigned char *,uint );
@@ -102,6 +103,59 @@ static int nand_image_load(u32 blkstart, void (**image_p)(void))return 0 ; } +static void pnorcopy (void *dest,const void *src,size_t len, +pnor_width_t width) +{ +const u32 *src_32 = src; +const u16 *src_16 = src; +const u8 *src_8 = src; +u32 *dest_32 = dest; +u16 *dest_16 = dest; +u8 *dest_8 = dest; +int i; + +switch (width) { +case PNOR_WIDTH_32 : +for (i =0 ; i < len >>2 ; i++) + *dest_32++ = *src_32++; +break ; +case PNOR_WIDTH_16 : +for (i =0 ; i < len >>1 ; i++) + *dest_16++ = *src_16++; +break ; +case PNOR_WIDTH_8 : +default : +for (i =0 ; i < len; i++) + *dest_8++ = *src_8++; +break ; + } +} + +static int pnor_image_load (const void *load_addr,void (**image_p)(void ), +pnor_width_t width) +{ +image_header_t header; +u32 numbytes; + +pnorcopy ((void *)&header, load_addr,sizeof (header), width); + +if (image_check_header (&header)) { + numbytes =image_get_data_size (&header); + +/* Copy the image to load address */ +pnorcopy ((void *)image_get_load (&header), + load_addr +sizeof (header), numbytes, width); + +if (image_check_data (&header)) { +/* Jump to boot image */ + *image_p = (void (*)(void ))image_get_load (&header); +return 1 ; + } + } + +return 0 ; +} +static void boot_image (void (*image)(void )) {void (*funcp)(void )__noreturn = (void *)image;
@@ -109,6 +163,13 @@ static void boot_image(void (*image)(void)) (*funcp)(); } +static pnor_width_t __def_get_pnor_width (void ) +{ +return PNOR_WIDTH_SEARCH ; +} +pnor_width_t get_pnor_width (void ) + __attribute__((weak,alias ("__def_get_pnor_width" ))); +static void __def_board_lowlevel_late_init (void ) { }
@@ -170,7 +231,23 @@ u32 spl_boot(void)if (PNOR_BOOT_SUPPORTED &&pnor_boot_selected ()) {/* PNOR booting */ -/* Not ported from XLoader to SPL yet */ +/* PNOR initialization */ +pnor_width_t width =get_pnor_width (); + +if (width ==PNOR_WIDTH_SEARCH ) + width =PNOR_WIDTH_8 ; + +/* NAND booting */ +if (pnor_image_load ((const void *)CONFIG_SYS_PNOR_BOOT_BASE , + &image, width)) { +/* Platform related late initialasations */ +board_lowlevel_late_init (); + +/* Jump to boot image */ +boot_image (image); +return 1 ; + } +return 0 ; }
arch/arm/include/asm/arch-spear/generic.h +0 -6
@@ -118,10 +118,4 @@ extern int get_socrev(void);#define MAC_OFF 0x2#define MAC_LEN 0x6 -#define PNOR_WIDTH_8 0 -#define PNOR_WIDTH_16 1 -#define PNOR_WIDTH_32 2 -#define PNOR_WIDTH_NUM 3 -#define PNOR_WIDTH_SEARCH 0xff -#endif
arch/arm/include/asm/arch-spear/spl_pnor.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Micoelectronics, [email protected]. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef ASM_ARCH_SPEAR_SPL_PNOR_H +#define ASM_ARCH_SPEAR_SPL_PNOR_H + +typedef enum { +PNOR_WIDTH_8 , +PNOR_WIDTH_16 , +PNOR_WIDTH_32 , +PNOR_WIDTH_SEARCH +}pnor_width_t ; + +#endif
include/configs/spear600-evb.h +1 -0
@@ -85,6 +85,7 @@#define CONFIG_DDR_MT47H32M16 #define CONFIG_SPL_TEXT_BASE 0xD2800B00#define CONFIG_SYS_SNOR_BOOT_BASE 0xF8010000 +#define CONFIG_SYS_PNOR_BOOT_BASE 0x00000000#define CONFIG_SYS_NAND_BOOT_BLK 4#if defined(CONFIG_ENV_IS_IN_FLASH )
Signature · 1 line
1.7.11.4
PATCH 9/9 spear300evb: Add SPL support
In reply to Vipin KumarThis patch also adds related code for spear3xx which is later used for spear310 and spear320 based boards
spear310evb: Add SPL support
spear320evb/spear320hmi: Add SPL support
--- arch/arm/cpu/arm926ejs/spear/Makefile | 1 + arch/arm/cpu/arm926ejs/spear/spl-spear3xx.c | 136 ++++++++++++++++++ arch/arm/include/asm/arch-spear/generic.h | 2 + arch/arm/include/asm/arch-spear/spear300.h | 23 ++++ arch/arm/include/asm/arch-spear/spear310.h | 22 +++ arch/arm/include/asm/arch-spear/spear320.h | 25 ++++ arch/arm/include/asm/arch-spear/spear3xx.h | 2 + board/st/spear/config.mk | 3 - board/st/spear/ddr/Makefile | 5 + board/st/spear/ddr/spr3xx_mt46h32m16_6_166_cl3.c | 140 +++++++++++++++++++ .../spear/ddr/spr3xx_mt47h64m16_3_166_cl4_async.c | 146 ++++++++++++++++++++ .../spear/ddr/spr3xx_mt47h64m16_3_266_cl5_async.c | 146 ++++++++++++++++++++ .../spear/ddr/spr3xx_mt47h64m16_3_333_cl5_async.c | 152 +++++++++++++++++++++ board/st/spear/spear300evb.c | 7 + board/st/spear/spear310evb.c | 31 +++++ board/st/spear/spear320hmi.c | 7 + board/st/spear/spear320plc.c | 7 + include/configs/spear.h | 4 + include/configs/spear300-evb.h | 5 + include/configs/spear310-evb.h | 5 + include/configs/spear3xx.h | 15 ++ 21 files changed, 881 insertions(+), 3 deletions(-) create mode 100644 board/st/spear/ddr/spr3xx_mt46h32m16_6_166_cl3.c create mode 100644 board/st/spear/ddr/spr3xx_mt47h64m16_3_166_cl4_async.c create mode 100644 board/st/spear/ddr/spr3xx_mt47h64m16_3_266_cl5_async.c create mode 100644 board/st/spear/ddr/spr3xx_mt47h64m16_3_333_cl5_async.c
arch/arm/cpu/arm926ejs/spear/Makefile +1 -0
@@ -39,6 +39,7 @@ COBJS-$(CONFIG_ARCH_SPEAR6XX) += spear6xx.o ifdef CONFIG_SPL_BUILD COBJS-y += spl.o spl_boot.o spl_nand.o +COBJS-$(CONFIG_ARCH_SPEAR3XX) += spl-spear3xx.o COBJS-$(CONFIG_SOC_SPEAR600) += spl-spear600.o endif
arch/arm/cpu/arm926ejs/spear/spl-spear3xx.c +136 -0
145 lines not on this page · raw message
arch/arm/include/asm/arch-spear/generic.h +2 -0
@@ -30,8 +30,10 @@ extern unsigned int setfreq_sz;extern void board_ddr_init (void );extern void board_lowlevel_late_init (void ); +/* Routines exported from SoC area */ extern void spear3xx_usbh_stop (void );extern void spear6xx_usbh_stop (void ); +extern void spear3xx_ddr_comp_init (void );extern u32 mpmc_conf_vals[];
arch/arm/include/asm/arch-spear/spear300.h +23 -0
@@ -26,6 +26,19 @@#include <asm/arch/spear3xx.h> +#define CONFIG_SYS_TELECOM_BASE 0x50000000 +#define SPEAR300_BOOTSHFT 16 +#define SPEAR300_BOOTMASK 0xF +#define SPEAR300_USBBOOT 0x0 +#define SPEAR300_TFTPI2CBOOT 0x1 +#define SPEAR300_TFTPSPIBOOT 0x2 +#define SPEAR300_SNORBOOT 0x3 +#define SPEAR300_PNOR8BOOT 0x4 +#define SPEAR300_PNOR16BOOT 0x5 +#define SPEAR300_NAND8BOOT 0x6 +#define SPEAR300_NAND16BOOT 0x7 +#define SPEAR300_UARTBOOT 0xA +#define CONFIG_SYS_FSMC_BASE 0x94000000#define CONFIG_SYS_NAND_CLE (1 << 16)#define CONFIG_SYS_NAND_ALE (1 << 17)
@@ -50,6 +63,16 @@#define SPEAR300_MODE_CAMULCDW (0xE << 0)#define SPEAR300_MODE_CAM1LCD (0xF << 0) +#define SNOR_BOOT_SUPPORTED 1 +#define NAND_BOOT_SUPPORTED 1 +#define PNOR_BOOT_SUPPORTED 1 +#define USBD_BOOT_SUPPORTED 1 +#define TFTP_BOOT_SUPPORTED 1 +#define UART_BOOT_SUPPORTED 1 +#define MMC_BOOT_SUPPORTED 0 +#define SPI_BOOT_SUPPORTED 0 +#define I2C_BOOT_SUPPORTED 0 +#define SPEAR3XX_FUNC_ENB_REG SPEAR300_RAS_REG1/* externs related to pinmux */
arch/arm/include/asm/arch-spear/spear310.h +22 -0
@@ -38,12 +38,34 @@#define CONFIG_SPEAR_RASBASE 0xB4000000/* SPEAr310 RAS misc space registers and bitmasks */ +#define SPEAR310_BOOT_REG (CONFIG_SPEAR_RASBASE + 0x0) +#define SPEAR310_BOOTSHFT 0x0 +#define SPEAR310_BOOTMASK 0x7 +#define SPEAR310_USBBOOT 0x3 +#define SPEAR310_NANDBOOT 0x2 +#define SPEAR310_PNORBOOT 0x1 +#define SPEAR310_SNORBOOT 0x0 +#define SPEAR310_EMIBW_SHFT 0x3 +#define SPEAR310_EMIBW_MASK 0x18 +#define SPEAR310_EMIBW_8 0x0 +#define SPEAR310_EMIBW_16 0x1 +#define SPEAR310_EMIBW_32 0x2#define SPEAR310_FUNCENB_REG (CONFIG_SPEAR_RASBASE + 0x8)#define SPEAR310_SMII_REG (CONFIG_SPEAR_RASBASE + 0xC)#define SPEAR310_SMII_PHY_SHIFT 0x0#define SPEAR310_SMII_PHY_MASK 0x3 +#define SNOR_BOOT_SUPPORTED 1 +#define NAND_BOOT_SUPPORTED 1 +#define PNOR_BOOT_SUPPORTED 1 +#define USBD_BOOT_SUPPORTED 1 +#define TFTP_BOOT_SUPPORTED 0 +#define UART_BOOT_SUPPORTED 0 +#define MMC_BOOT_SUPPORTED 0 +#define SPI_BOOT_SUPPORTED 0 +#define I2C_BOOT_SUPPORTED 0 +#define SPEAR3XX_FUNC_ENB_REG SPEAR310_FUNCENB_REG/* externs related to pinmux */
arch/arm/include/asm/arch-spear/spear320.h +25 -0
@@ -44,6 +44,21 @@#define SPEAR320_EXTENDED_MODE (1 << 4)/* SPEAr320 RAS misc space registers and bitmasks */ +#define SPEAR320_BOOT_REG (CONFIG_SPEAR_RASBASE + 0x0) +#define SPEAR320_BOOTSHFT 0x0 +#define SPEAR320_BOOTMASK 0xF +#define SPEAR320_USBBOOT 0x0 +#define SPEAR320_TFTPI2CBOOT 0x1 +#define SPEAR320_TFTPSPIBOOT 0x2 +#define SPEAR320_SNORBOOT 0x3 +#define SPEAR320_PNOR8BOOT 0x4 +#define SPEAR320_PNOR16BOOT 0x5 +#define SPEAR320_NAND8BOOT 0x6 +#define SPEAR320_NAND16BOOT 0x7 +#define SPEAR320_UARTBOOT 0xA +#define SPEAR320_PNOR8NOACKBOOT 0xC +#define SPEAR320_PNOR16NOACKBOOT 0xD +#define SPEAR320_RASSELECT_REG (CONFIG_SPEAR_RASBASE + 0x000C)#define SPEAR320_CONTROL_REG (CONFIG_SPEAR_RASBASE + 0x0010)
@@ -452,6 +467,16 @@#define PMX_SDHCI_CD_PORT_12_VAL 0#define PMX_SDHCI_CD_PORT_51_VAL (0x1 << 29) +#define SNOR_BOOT_SUPPORTED 1 +#define NAND_BOOT_SUPPORTED 1 +#define PNOR_BOOT_SUPPORTED 1 +#define USBD_BOOT_SUPPORTED 1 +#define TFTP_BOOT_SUPPORTED 1 +#define UART_BOOT_SUPPORTED 1 +#define MMC_BOOT_SUPPORTED 0 +#define SPI_BOOT_SUPPORTED 0 +#define I2C_BOOT_SUPPORTED 0 +#define SPEAR3XX_FUNC_ENB_REG SPEAR320_RASSELECT_REG/* externs related to pinmux */
arch/arm/include/asm/arch-spear/spear3xx.h +2 -0
@@ -33,6 +33,8 @@#define CONFIG_SYS_UHC0_EHCI_BASE 0xE1800000#define CONFIG_SYS_SMI_BASE 0xFC000000#define CONFIG_SPEAR_MPMCBASE 0xFC600000 +#define CONFIG_SPEAR_MPMCREGS 109 +#define CONFIG_SPEAR_TIMERBASE 0xFC800000#define CONFIG_SPEAR_SYSCNTLBASE 0xFCA00000#define CONFIG_SPEAR_MISCBASE 0xFCA80000
board/st/spear/config.mk +0 -3
@@ -23,8 +23,5 @@ ifndef CONFIG_SPL_BUILD ALL-y += $(obj)u-boot.img - -ifdef CONFIG_MACH_SPEAR600EVB ALL-y += $(obj)spl/u-boot-spl.img endif -endif
board/st/spear/ddr/Makefile +5 -0
@@ -36,6 +36,11 @@ COBJS-$(CONFIG_DDR_MT47H64M16) += spear600_mt47h64m16_3_333_cl5_psync.o COBJS-$(CONFIG_DDR_MT47H32M16) += spear600_mt47h32m16_333_cl5_psync.o COBJS-$(CONFIG_DDR_MT47H32M16) += spear600_mt47h32m16_37e_166_cl4_sync.o COBJS-$(CONFIG_DDR_MT47H128M8) += spear600_mt47h128m8_3_266_cl5_async.o + +COBJS-$(CONFIG_DDR_MT46H32M16) += spr3xx_mt46h32m16_6_166_cl3.o +COBJS-$(CONFIG_DDR_MT47H64M16) += spr3xx_mt47h64m16_3_166_cl4_async.o +COBJS-$(CONFIG_DDR_MT47H64M16) += spr3xx_mt47h64m16_3_266_cl5_async.o +COBJS-$(CONFIG_DDR_MT47H64M16) += spr3xx_mt47h64m16_3_333_cl5_async.o endif COBJS := $(sort $(COBJS-y))
board/st/spear/ddr/spr3xx_mt46h32m16_6_166_cl3.c new file +140 -0
140 lines not on this page · raw message
board/st/spear/ddr/spr3xx_mt47h64m16_3_166_cl4_async.c new file +146 -0
146 lines not on this page · raw message
board/st/spear/ddr/spr3xx_mt47h64m16_3_266_cl5_async.c new file +146 -0
146 lines not on this page · raw message
board/st/spear/ddr/spr3xx_mt47h64m16_3_333_cl5_async.c new file +152 -0
152 lines not on this page · raw message
board/st/spear/spear300evb.c +7 -0
@@ -99,3 +99,10 @@ int board_eth_init(bd_t *bis) return ret; }#endif + +#if defined(CONFIG_SPL_BUILD ) +void board_ddr_init (void ) +{ +spear3xx_ddr_comp_init (); +} +#endif
board/st/spear/spear310evb.c +31 -0
@@ -32,6 +32,7 @@#include <asm/arch/generic.h> #include <asm/arch/misc.h> #include <asm/arch/pinmux.h> +#include <asm/arch/spl_pnor.h> #if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];
@@ -109,3 +110,33 @@ int board_eth_init(bd_t *bis) return ret; }#endif + +#if defined(CONFIG_SPL_BUILD ) +void board_ddr_init (void ) +{ +spear3xx_ddr_comp_init (); +} + +/* +void soc_init(void) +{ +writel(0x2f7bc210, &misc_p->plgpio3_pad_prg); +writel(0x017bdef6, &misc_p->plgpio4_pad_prg); +} +*/ + +pnor_width_t get_pnor_width (void ) +{ +u32 emi_buswidth = (readl (SPEAR310_BOOT_REG ) &SPEAR310_EMIBW_MASK ) >> +SPEAR310_EMIBW_SHFT ; + +if (SPEAR310_EMIBW_8 == emi_buswidth) +return PNOR_WIDTH_8 ; +else if (SPEAR310_EMIBW_16 == emi_buswidth) +return PNOR_WIDTH_16 ; +else if (SPEAR310_EMIBW_32 == emi_buswidth) +return PNOR_WIDTH_32 ; +else +return PNOR_WIDTH_SEARCH ; +} +#endif
board/st/spear/spear320hmi.c +7 -0
@@ -118,3 +118,10 @@ int board_mmc_init(bd_t *bis) return ret; }#endif + +#if defined(CONFIG_SPL_BUILD ) +void board_ddr_init (void ) +{ +spear3xx_ddr_comp_init (); +} +#endif
board/st/spear/spear320plc.c +7 -0
@@ -135,3 +135,10 @@ int board_mmc_init(bd_t *bis) return ret; }#endif + +#if defined(CONFIG_SPL_BUILD ) +void board_ddr_init (void ) +{ +spear3xx_ddr_comp_init (); +} +#endif
include/configs/spear.h +4 -0
@@ -199,6 +199,10 @@#define CONFIG_SYS_DCACHE_OFF #endif +#ifndef CONFIG_SYS_PNOR_BOOT_BASE +#define CONFIG_SYS_PNOR_BOOT_BASE 0x0 +#endif +#define CONFIG_OF_LIBFDT #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS
include/configs/spear300-evb.h +5 -0
@@ -78,6 +78,11 @@/* ST SMI (Serial flash) configurations */ #define CONFIG_ST_SMI +/* SPL support */ +#define CONFIG_SPL +#define CONFIG_SPEAR_DDR_2HCLK +#define CONFIG_DDR_MT47H64M16 +#if defined(CONFIG_ENV_IS_IN_FLASH )/* Environment is in serial NOR flash */ #define CONFIG_ENV_ADDR 0xF8060000
include/configs/spear310-evb.h +5 -0
@@ -95,6 +95,11 @@#define CONFIG_ST_SMI #endif +/* SPL support */ +#define CONFIG_SPL +#define CONFIG_SPEAR_DDR_2HCLK +#define CONFIG_DDR_MT47H64M16 +/* CFI Driver configurations */ #if defined(CONFIG_FLASH_PNOR )#define CONFIG_FLASH_CFI_DRIVER
include/configs/spear3xx.h +15 -0
@@ -46,5 +46,20 @@#define CONFIG_SYS_INIT_SP_ADDR (0xD2800000 + 0x2000 - \ GENERATED_GBL_DATA_SIZE) +/* SPL configurations */ +#if defined(CONFIG_SPL ) +#define CONFIG_SPL_TEXT_BASE 0xD2800B00 +#define CONFIG_SYS_SNOR_BOOT_BASE 0xF8010000 +#define CONFIG_SYS_NAND_BOOT_BLK 4 + +#define CONFIG_SPL_NO_CPU_SUPPORT_CODE +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_MTD_SUPPORT +#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/spear" +#define CONFIG_SPL_LDSCRIPT \ + "arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds" +#endif +#include <configs/spear.h> #endif /* __CONFIG_SPEAR3XX_H */
Signature · 1 line
1.7.11.4
PATCH 1/11 SPEAr: Remove extra spear board configurations
In reply to a message not in the archive--- boards.cfg | 8 -------- 1 file changed, 8 deletions(-)
boards.cfg +0 -8
@@ -201,23 +201,15 @@ dkb arm arm926ejs - Marvell pantheon spear300 arm arm926ejs spear300 spear spear spear3xx_evb:spear300 spear300_nand arm arm926ejs spear300 spear spear spear3xx_evb:spear300,nand spear300_usbtty arm arm926ejs spear300 spear spear spear3xx_evb:spear300,usbtty -spear300_usbtty_nand arm arm926ejs spear300 spear spear spear3xx_evb:spear300,usbtty,nand spear310 arm arm926ejs spear310 spear spear spear3xx_evb:spear310 spear310_pnor arm arm926ejs spear310 spear spear spear3xx_evb:spear310,FLASH_PNOR spear310_nand arm arm926ejs spear310 spear spear spear3xx_evb:spear310,nand spear310_usbtty arm arm926ejs spear310 spear spear spear3xx_evb:spear310,usbtty -spear310_usbtty_pnor arm arm926ejs spear310 spear spear spear3xx_evb:spear310,usbtty,FLASH_PNOR -spear310_usbtty_nand arm arm926ejs spear310 spear spear spear3xx_evb:spear310,usbtty,nand spear320 arm arm926ejs spear320 spear spear spear3xx_evb:spear320 -spear320_pnor arm arm926ejs spear320 spear spear spear3xx_evb:spear320,FLASH_PNOR -spear320_nand arm arm926ejs spear320 spear spear spear3xx_evb:spear320,nand spear320_usbtty arm arm926ejs spear320 spear spear spear3xx_evb:spear320,usbtty -spear320_usbtty_pnor arm arm926ejs spear320 spear spear spear3xx_evb:spear320,usbtty,FLASH_PNOR -spear320_usbtty_nand arm arm926ejs spear320 spear spear spear3xx_evb:spear320,usbtty,nand spear600 arm arm926ejs spear600 spear spear spear6xx_evb:spear600 spear600_nand arm arm926ejs spear600 spear spear spear6xx_evb:spear600,nand spear600_usbtty arm arm926ejs spear600 spear spear spear6xx_evb:spear600,usbtty -spear600_usbtty_nand arm arm926ejs spear600 spear spear spear6xx_evb:spear600,usbtty,nand x600 arm arm926ejs - spear spear x600 versatileab arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_AB versatilepb arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_PB
Signature · 1 line
1.7.11.4
PATCH 2/11 spear/configs: Split config files hierarchically into plat, arch, soc and board
The spear configuration files are split into spear6xx_evb.h and spear3xx_evb.h with the common configurations placed in spear-common.h.
This split of configuration is not very conducive to increasing number of boards within each architecture. With number of boards supported by spear3xx_evb.h going up to 4, managing those boards becomes a tedious task.
This patch tries to re-split the spear configuration files hierarchically into
board files (spear600-evb.h, spear300-evb.h ...)
soc files (spear600.h, spear300.h ...)
arch files (spear6xx.h, spear3xx.h)
platform file (spear.h)
board configuration file would define the driver enabler which is required for that respective board and would also define all board related configurations. All other generic configurations would be defined by respective config files (either spear3xx.h or spear300.h/spear310.h etc)
---
arch/arm/cpu/arm926ejs/spear/cpu.c | 12 +-
arch/arm/cpu/arm926ejs/spear/spl.c | 8 +-
arch/arm/cpu/arm926ejs/spear/timer.c | 4 +-
arch/arm/include/asm/arch-spear/spr_misc.h | 4 +-
include/configs/spear-common.h | 251 -------------------------
include/configs/spear.h | 193 +++++++++++++++++++
include/configs/spear300-evb.h | 99 ++++++++++
include/configs/{spear6xx_evb.h => spear300.h} | 45 ++---
include/configs/spear310-evb.h | 130 +++++++++++++
include/configs/spear310.h | 76 ++++++++
include/configs/spear320-evb.h | 128 +++++++++++++
include/configs/spear320.h | 66 +++++++
include/configs/spear3xx.h | 50 +++++
include/configs/spear3xx_evb.h | 173 -----------------
include/configs/spear600-evb.h | 99 ++++++++++
include/configs/spear600.h | 58 ++++++
include/configs/x600.h | 2 +-
17 files changed, 928 insertions(+), 470 deletions(-)
delete mode 100644 include/configs/spear-common.h
create mode 100644 include/configs/spear.h
create mode 100644 include/configs/spear300-evb.h
rename include/configs/{spear6xx_evb.h => spear300.h} (54%)
create mode 100644 include/configs/spear310-evb.h
create mode 100644 include/configs/spear310.h
create mode 100644 include/configs/spear320-evb.h
create mode 100644 include/configs/spear320.h
create mode 100644 include/configs/spear3xx.h
delete mode 100644 include/configs/spear3xx_evb.h
create mode 100644 include/configs/spear600-evb.h
create mode 100644 include/configs/spear600.harch/arm/cpu/arm926ejs/spear/cpu.c +6 -6
@@ -34,9 +34,9 @@ int arch_cpu_init(void) periph1_clken =readl (&misc_p->periph1_clken); -#if defined(CONFIG_SPEAR3XX ) +#if defined(CONFIG_ARCH_SPEAR3XX ) periph1_clken |=MISC_GPT2ENB ; -#elif defined(CONFIG_SPEAR600 ) +#elif defined(CONFIG_SOC_SPEAR600 ) periph1_clken |=MISC_GPT3ENB ;#endif
@@ -71,13 +71,13 @@ int arch_cpu_init(void)#ifdef CONFIG_DISPLAY_CPUINFO int print_cpuinfo (void ) { -#ifdef CONFIG_SPEAR300 +#ifdef CONFIG_SOC_SPEAR300 printf ("CPU: SPEAr300\n" ); -#elif defined(CONFIG_SPEAR310 ) +#elif defined(CONFIG_SOC_SPEAR310 )printf ("CPU: SPEAr310\n" ); -#elif defined(CONFIG_SPEAR320 ) +#elif defined(CONFIG_SOC_SPEAR320 )printf ("CPU: SPEAr320\n" ); -#elif defined(CONFIG_SPEAR600 ) +#elif defined(CONFIG_SOC_SPEAR600 )printf ("CPU: SPEAr600\n" );#else #error CPU not supported in spear platform
arch/arm/cpu/arm926ejs/spear/spl.c +4 -4
@@ -203,7 +203,7 @@ static void sys_init(void)*/ int get_socrev (void ) { -#if defined(CONFIG_SPEAR600 ) +#if defined(CONFIG_SOC_SPEAR600 )struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ;u32 soc_id =readl (&misc_p->soc_core_id);u32 pri_socid = (soc_id >>SOC_PRI_SHFT ) &0xFF ;
@@ -219,11 +219,11 @@ int get_socrev(void)return SOC_SPEAR600_BA ; else return SOC_SPEAR_NA; -#elif defined(CONFIG_SPEAR300 ) +#elif defined(CONFIG_SOC_SPEAR300 )return SOC_SPEAR300 ; -#elif defined(CONFIG_SPEAR310 ) +#elif defined(CONFIG_SOC_SPEAR310 )return SOC_SPEAR310 ; -#elif defined(CONFIG_SPEAR320 ) +#elif defined(CONFIG_SOC_SPEAR320 )return SOC_SPEAR320 ;#endif }
arch/arm/cpu/arm926ejs/spear/timer.c +2 -2
@@ -46,10 +46,10 @@ int timer_init(void)u32 synth;/* Prescaler setting */ -#if defined(CONFIG_SPEAR3XX ) +#if defined(CONFIG_ARCH_SPEAR3XX )writel (MISC_PRSC_CFG , &misc_regs_p->prsc2_clk_cfg); synth =MISC_GPT4SYNTH ; -#elif defined(CONFIG_SPEAR600 ) +#elif defined(CONFIG_ARCH_SPEAR6XX )writel (MISC_PRSC_CFG , &misc_regs_p->prsc1_clk_cfg); synth =MISC_GPT3SYNTH ;#else
arch/arm/include/asm/arch-spear/spr_misc.h +2 -2
@@ -105,10 +105,10 @@ struct misc_regs {#define SYNTH23 0x00020003/* PLLx_FRQ value */ -#if defined(CONFIG_SPEAR3XX ) +#if defined(CONFIG_ARCH_SPEAR3XX )#define FREQ_332 0xA600010C#define FREQ_266 0x8500010C -#elif defined(CONFIG_SPEAR600 ) +#elif defined(CONFIG_ARCH_SPEAR6XX )#define FREQ_332 0xA600010F#define FREQ_266 0x8500010F#endif
include/configs/spear-common.h deleted +0 -251
251 lines not on this page · raw message
include/configs/spear.h new file +193 -0
193 lines not on this page · raw message
include/configs/spear300-evb.h new file +99 -0
99 lines not on this page · raw message
include/configs/spear300.h renamed from include/configs/spear6xx_evb.h +14 -31
58 lines not on this page · raw message
include/configs/spear310-evb.h new file +130 -0
130 lines not on this page · raw message
include/configs/spear310.h new file +76 -0
76 lines not on this page · raw message
include/configs/spear320-evb.h new file +128 -0
128 lines not on this page · raw message
include/configs/spear320.h new file +66 -0
66 lines not on this page · raw message
include/configs/spear3xx.h new file +50 -0
50 lines not on this page · raw message
include/configs/spear3xx_evb.h deleted +0 -173
173 lines not on this page · raw message
include/configs/spear600-evb.h new file +99 -0
99 lines not on this page · raw message
include/configs/spear600.h new file +58 -0
58 lines not on this page · raw message
include/configs/x600.h +1 -1
@@ -30,7 +30,7 @@* High Level Configuration Options * (easy to change) */ -#define CONFIG_SPEAR600 /* SPEAr600 SoC */ +#define CONFIG_SOC_SPEAR600 /* SPEAr600 SoC */ #define CONFIG_X600 /* on X600 board */ #include <asm/arch/hardware.h>
Signature · 1 line
1.7.11.4
PATCH 3/11 spear/include: Clean up the spear include files
In reply to Vipin KumarThis patch targets a few cleanup actions in include files
- Split hardware.h into soc and arch base addresses Splits the files hierarchically into architecture and soc specific
- Drop the spr_ prefix from the arch header names
- Remove extra header files
- Use only MISC_ as a prefix for misc register address bits
- Add protection against multiple inclusions
---
arch/arm/cpu/arm926ejs/spear/cpu.c | 2 +-
arch/arm/cpu/arm926ejs/spear/reset.c | 2 +-
arch/arm/cpu/arm926ejs/spear/spear600.c | 4 +-
arch/arm/cpu/arm926ejs/spear/spl.c | 6 +-
arch/arm/cpu/arm926ejs/spear/spl_boot.c | 5 +-
arch/arm/cpu/arm926ejs/spear/timer.c | 4 +-
arch/arm/include/asm/arch-spear/clk.h | 5 ++
.../include/asm/arch-spear/{spr_emi.h => emi.h} | 8 +--
.../asm/arch-spear/{spr_defs.h => generic.h} | 15 +----
.../include/asm/arch-spear/{spr_gpt.h => gpt.h} | 4 +-
arch/arm/include/asm/arch-spear/hardware.h | 78 ++++------------------
.../include/asm/arch-spear/{spr_misc.h => misc.h} | 4 +-
.../asm/arch-spear/{spr_ssp.h => spear300.h} | 30 +++------
arch/arm/include/asm/arch-spear/spear310.h | 40 +++++++++++
arch/arm/include/asm/arch-spear/spear320.h | 38 +++++++++++
arch/arm/include/asm/arch-spear/spear3xx.h | 40 +++++++++++
arch/arm/include/asm/arch-spear/spear600.h | 45 +++++++++++++
.../asm/arch-spear/{spr_syscntl.h => syscntl.h} | 0
board/spear/common/spr_misc.c | 3 +-
board/spear/spear300/spear300.c | 4 +-
board/spear/spear310/spear310.c | 4 +-
board/spear/spear320/spear320.c | 4 +-
board/spear/spear600/spear600.c | 4 +-
23 files changed, 219 insertions(+), 130 deletions(-)
rename arch/arm/include/asm/arch-spear/{spr_emi.h => emi.h} (94%)
rename arch/arm/include/asm/arch-spear/{spr_defs.h => generic.h} (88%)
rename arch/arm/include/asm/arch-spear/{spr_gpt.h => gpt.h} (97%)
rename arch/arm/include/asm/arch-spear/{spr_misc.h => misc.h} (99%)
rename arch/arm/include/asm/arch-spear/{spr_ssp.h => spear300.h} (64%)
create mode 100644 arch/arm/include/asm/arch-spear/spear310.h
create mode 100644 arch/arm/include/asm/arch-spear/spear320.h
create mode 100644 arch/arm/include/asm/arch-spear/spear3xx.h
create mode 100644 arch/arm/include/asm/arch-spear/spear600.h
rename arch/arm/include/asm/arch-spear/{spr_syscntl.h => syscntl.h} (100%)arch/arm/cpu/arm926ejs/spear/cpu.c +1 -1
@@ -24,7 +24,7 @@#include <common.h> #include <asm/io.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_misc.h> +#include <asm/arch/misc.h> int arch_cpu_init (void ) {
arch/arm/cpu/arm926ejs/spear/reset.c +1 -1
@@ -24,7 +24,7 @@#include <common.h> #include <asm/io.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_syscntl.h> +#include <asm/arch/syscntl.h> void reset_cpu (ulong ignored) {
arch/arm/cpu/arm926ejs/spear/spear600.c +2 -2
@@ -25,8 +25,8 @@#include <common.h> #include <asm/hardware.h> #include <asm/io.h> -#include <asm/arch/spr_misc.h> -#include <asm/arch/spr_defs.h> +#include <asm/arch/misc.h> +#include <asm/arch/generic.h> #define FALSE 0#define TRUE (!FALSE)
arch/arm/cpu/arm926ejs/spear/spl.c +3 -3
@@ -27,9 +27,9 @@#include <version.h> #include <asm/io.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_defs.h> -#include <asm/arch/spr_misc.h> -#include <asm/arch/spr_syscntl.h> +#include <asm/arch/generic.h> +#include <asm/arch/misc.h> +#include <asm/arch/syscntl.h> inline void hang (void ) {
arch/arm/cpu/arm926ejs/spear/spl_boot.c +3 -2
@@ -26,9 +26,10 @@#include <common.h> #include <image.h> #include <linux/compiler.h> -#include <asm/io.h> -#include <asm/arch/spr_defs.h> #include <linux/mtd/st_smi.h> +#include <asm/io.h> +#include <asm/arch/hardware.h> +#include <asm/arch/generic.h> static const char kernel_name[] ="Linux" ;static const char loader_name[] ="U-Boot" ;
arch/arm/cpu/arm926ejs/spear/timer.c +2 -2
@@ -24,8 +24,8 @@#include <common.h> #include <asm/io.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_gpt.h> -#include <asm/arch/spr_misc.h> +#include <asm/arch/gpt.h> +#include <asm/arch/misc.h> #define GPT_RESOLUTION (CONFIG_SPEAR_HZ_CLOCK / CONFIG_SPEAR_HZ)#define READ_TIMER () (readl(&gpt_regs_p->count) & GPT_FREE_RUNNING)
arch/arm/include/asm/arch-spear/clk.h +5 -0
@@ -21,7 +21,12 @@* MA 02111-1307 USA */ +#ifndef ASM_ARCH_SPEAR_CLK_H +#define ASM_ARCH_SPEAR_CLK_H +static inline unsigned long get_macb_pclk_rate (unsigned int dev_id) {return 83000000 ; } + +#endif
arch/arm/include/asm/arch-spear/emi.h renamed from arch/arm/include/asm/arch-spear/spr_emi.h +2 -6
@@ -21,10 +21,8 @@* MA 02111-1307 USA */ -#ifndef __SPEAR_EMI_H__ -#define __SPEAR_EMI_H__ - -#ifdef CONFIG_SPEAR_EMI +#ifndef ASM_ARCH_SPEAR_EMI_H +#define ASM_ARCH_SPEAR_EMI_H struct emi_bank_regs { u32 tap;
@@ -50,5 +48,3 @@ struct emi_regs {#define EMI_CNTL_ENBBYTERW (EMI_CNTL_ENBBYTER | EMI_CNTL_ENBBYTEW)#endif - -#endif
arch/arm/include/asm/arch-spear/generic.h renamed from arch/arm/include/asm/arch-spear/spr_defs.h +3 -12
@@ -21,15 +21,13 @@* MA 02111-1307 USA */ -#ifndef __SPR_DEFS_H__ -#define __SPR_DEFS_H__ +#ifndef ASM_ARCH_SPEAR_GENERIC_H +#define ASM_ARCH_SPEAR_GENERIC_H -extern int spear_board_init (ulong ); +/* Routines exported from baord */ extern void setfreq (unsigned int ,unsigned int );extern unsigned int setfreq_sz; -void plat_ddr_init (void ); -void soc_init (void );void spear_late_init (void );void plat_late_init (void );
@@ -45,13 +43,6 @@ int mmc_boot_selected(void);extern u32 mpmc_conf_vals[]; -struct chip_data { -int cpufreq; -int dramfreq; -int dramtype; -uchar version[32 ]; -}; -/* HW mac id in i2c memory definitions */ #define MAGIC_OFF 0x0#define MAGIC_LEN 0x2
arch/arm/include/asm/arch-spear/gpt.h renamed from arch/arm/include/asm/arch-spear/spr_gpt.h +2 -2
@@ -21,8 +21,8 @@* MA 02111-1307 USA */ -#ifndef _SPR_GPT_H -#define _SPR_GPT_H +#ifndef ASM_ARCH_SPEAR_GPT_H +#define ASM_ARCH_SPEAR_GPT_H struct gpt_regs { u8 reserved[0x80];
arch/arm/include/asm/arch-spear/hardware.h +12 -66
83 lines not on this page · raw message
arch/arm/include/asm/arch-spear/misc.h renamed from arch/arm/include/asm/arch-spear/spr_misc.h +2 -2
@@ -21,8 +21,8 @@* MA 02111-1307 USA */ -#ifndef _SPR_MISC_H -#define _SPR_MISC_H +#ifndef ASM_ARCH_SPEAR_MISC_H +#define ASM_ARCH_SPEAR_MISC_H struct misc_regs { u32 auto_cfg_reg; /* 0x0 */
arch/arm/include/asm/arch-spear/spear300.h renamed from arch/arm/include/asm/arch-spear/spr_ssp.h +9 -21
@@ -1,5 +1,6 @@/* -* Copyright (C) 2012 Stefan Roese <[email protected]> +* (C) Copyright 2012 +* Vipin Kumar, STMicroelectronics, <[email protected]> * * See file CREDITS for list of people who contributed to this * project.
@@ -11,7 +12,7 @@* * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
@@ -20,26 +21,13 @@* MA 02111-1307 USA */ -#ifndef _SPR_SSP_H -#define _SPR_SSP_H +#ifndef _ASM_ARCH_SPEAR300_H +#define _ASM_ARCH_SPEAR300_H -struct ssp_regs { -u32 sspcr0; -u32 sspcr1; -u32 sspdr; -u32 sspsr; -u32 sspcpsr; -u32 sspimsc; -u32 sspicr; -u32 sspdmacr; -}; +#include <asm/arch/spear3xx.h> -#define SSPCR0_FRF_MOT_SPI 0x0000 -#define SSPCR0_DSS_16BITS 0x000f - -#define SSPCR1_SSE 0x0002 - -#define SSPSR_TNF 0x2 -#define SSPSR_TFE 0x1 +#define CONFIG_SYS_FSMC_BASE 0x94000000 +#define CONFIG_SYS_NAND_CLE (1 << 16) +#define CONFIG_SYS_NAND_ALE (1 << 17)#endif
arch/arm/include/asm/arch-spear/spear310.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARCH_SPEAR310_H +#define _ASM_ARCH_SPEAR310_H + +#include <asm/arch/spear3xx.h> + +#define CONFIG_SYS_FSMC_BASE 0x44000000 +#define CONFIG_SYS_NAND_CLE (1 << 17) +#define CONFIG_SYS_NAND_ALE (1 << 16) + +#define CONFIG_SPEAR_EMIBASE 0x4F000000 +#define CONFIG_SYS_MACB0_BASE 0xB0000000 +#define CONFIG_SYS_MACB1_BASE 0xB0800000 +#define CONFIG_SYS_MACB2_BASE 0xB1000000 +#define CONFIG_SYS_MACB3_BASE 0xB1800000 +#define CONFIG_SPEAR_RASBASE 0xB4000000 + +#endif
arch/arm/include/asm/arch-spear/spear320.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARCH_SPEAR320_H +#define _ASM_ARCH_SPEAR320_H + +#include <asm/arch/spear3xx.h> + +#define CONFIG_SPEAR_EMIBASE 0x40000000 +#define CONFIG_SYS_FSMC_BASE 0x4C000000 +#define CONFIG_SYS_NAND_CLE (1 << 16) +#define CONFIG_SYS_NAND_ALE (1 << 17) + +#define CONFIG_SYS_MACB0_BASE 0xAA000000 +#define CONFIG_SYS_MACB1_BASE 0xAB000000 +#define CONFIG_SPEAR_RASBASE 0xB3000000 + +#endif
arch/arm/include/asm/arch-spear/spear3xx.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef _ASM_ARCH_SPEAR3XX_H +#define _ASM_ARCH_SPEAR3XX_H + +#define CONFIG_SYS_I2C_BASE 0xD0180000 +#define CONFIG_GPIO_BASE 0xD8100000 +#define CONFIG_SPEAR_ETHBASE 0xE0800000 +#define CONFIG_SYS_FIFO_BASE 0xE1000800 +#define CONFIG_SYS_USBD_BASE 0xE1100000 +#define CONFIG_SYS_PLUG_BASE 0xE1200000 +#define CONFIG_SYS_UHC0_EHCI_BASE 0xE1800000 +#define CONFIG_SYS_SMI_BASE 0xFC000000 +#define CONFIG_SPEAR_MPMCBASE 0xFC600000 +#define CONFIG_SPEAR_TIMERBASE 0xFC800000 +#define CONFIG_SPEAR_SYSCNTLBASE 0xFCA00000 +#define CONFIG_SPEAR_MISCBASE 0xFCA80000 + +#endif
arch/arm/include/asm/arch-spear/spear600.h new file +45 -0
45 lines not on this page · raw message
arch/arm/include/asm/arch-spear/syscntl.h renamed from arch/arm/include/asm/arch-spear/spr_syscntl.h +0 -0
board/spear/common/spr_misc.c +1 -2
@@ -28,8 +28,7 @@#include <linux/mtd/st_smi.h> #include <asm/io.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_emi.h> -#include <asm/arch/spr_defs.h> +#include <asm/arch/generic.h> #define CPU 0#define DDR 1
board/spear/spear300/spear300.c +2 -2
@@ -28,8 +28,8 @@#include <asm/io.h> #include <linux/mtd/fsmc_nand.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_defs.h> -#include <asm/arch/spr_misc.h> +#include <asm/arch/generic.h> +#include <asm/arch/misc.h> static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];
board/spear/spear310/spear310.c +2 -2
@@ -29,8 +29,8 @@#include <asm/io.h> #include <linux/mtd/fsmc_nand.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_defs.h> -#include <asm/arch/spr_misc.h> +#include <asm/arch/generic.h> +#include <asm/arch/misc.h> static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];
board/spear/spear320/spear320.c +2 -2
@@ -29,8 +29,8 @@#include <asm/io.h> #include <linux/mtd/fsmc_nand.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_defs.h> -#include <asm/arch/spr_misc.h> +#include <asm/arch/generic.h> +#include <asm/arch/misc.h> #define PLGPIO_SEL_36 0xb3000028#define PLGPIO_IO_36 0xb3000038
board/spear/spear600/spear600.c +2 -2
@@ -28,8 +28,8 @@#include <asm/io.h> #include <linux/mtd/fsmc_nand.h> #include <asm/arch/hardware.h> -#include <asm/arch/spr_defs.h> -#include <asm/arch/spr_misc.h> +#include <asm/arch/generic.h> +#include <asm/arch/misc.h> static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ];
Signature · 1 line
1.7.11.4
PATCH 4/11 spear/board: Cleanup spear related board files
In reply to Vipin KumarThis patch targets to cleanup the board area for spear. The modifications in this patch include
- Move spear board files to board/st/spear/
- Place specific init routines in respective macro
Place board_nand_init and board_eth_init in respective CONFIG_CMD_ macros
- Remove initialization of bi_arch_number
bi_arch_number gets initialized via CONFIG_MACH_TYPE through the uboot framework itself obviating the need of this code
- Remove misc_init_r routine
- Remove routine dram_init_banksize
---
board/spear/common/Makefile | 50 ----------------------
board/spear/spear300/Makefile | 45 -------------------
board/spear/spear320/Makefile | 45 -------------------
board/spear/x600/Makefile | 47 --------------------
board/{spear/spear600 => st/spear}/Makefile | 16 ++++++-
.../spear310/Makefile => st/spear/config.mk} | 27 ++----------
.../spear300/spear300.c => st/spear/spear300evb.c} | 12 +++---
.../spear310/spear310.c => st/spear/spear310evb.c} | 12 +++---
.../spear320/spear320.c => st/spear/spear320plc.c} | 11 +++--
.../spear600/spear600.c => st/spear/spear600evb.c} | 13 +++---
.../common/spr_misc.c => st/spear/spear_common.c} | 34 ++-------------
.../spear/spear_lowlevel_init.S} | 0
board/{spear/x600 => st/spear}/x600.c | 0
board/{spear/x600/fpga.c => st/spear/x600fpga.c} | 0
board/{spear/x600/fpga.h => st/spear/x600fpga.h} | 0
boards.cfg | 28 ++++++------
16 files changed, 61 insertions(+), 279 deletions(-)
delete mode 100644 board/spear/common/Makefile
delete mode 100644 board/spear/spear300/Makefile
delete mode 100644 board/spear/spear320/Makefile
delete mode 100644 board/spear/x600/Makefile
rename board/{spear/spear600 => st/spear}/Makefile (76%)
rename board/{spear/spear310/Makefile => st/spear/config.mk} (56%)
rename board/{spear/spear300/spear300.c => st/spear/spear300evb.c} (94%)
rename board/{spear/spear310/spear310.c => st/spear/spear310evb.c} (95%)
rename board/{spear/spear320/spear320.c => st/spear/spear320plc.c} (95%)
rename board/{spear/spear600/spear600.c => st/spear/spear600evb.c} (94%)
rename board/{spear/common/spr_misc.c => st/spear/spear_common.c} (89%)
rename board/{spear/common/spr_lowlevel_init.S => st/spear/spear_lowlevel_init.S} (100%)
rename board/{spear/x600 => st/spear}/x600.c (100%)
rename board/{spear/x600/fpga.c => st/spear/x600fpga.c} (100%)
rename board/{spear/x600/fpga.h => st/spear/x600fpga.h} (100%)board/spear/common/Makefile deleted +0 -50
@@ -1,50 +0,0 @@ -# -# (C) Copyright 2006 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# - -include $(TOPDIR)/config.mk - -ifneq ($(OBJTREE),$(SRCTREE)) -$(shell mkdir -p $(obj)board/$(VENDOR)/common) -endif - -LIB = $(obj)lib$(VENDOR).o - -ifndef CONFIG_SPL_BUILD -COBJS := spr_misc.o -SOBJS := spr_lowlevel_init.o -endif - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### -# This is for $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -#########################################################################
board/spear/spear300/Makefile deleted +0 -45
45 lines not on this page · raw message
board/spear/spear320/Makefile deleted +0 -45
45 lines not on this page · raw message
board/spear/x600/Makefile deleted +0 -47
47 lines not on this page · raw message
board/st/spear/Makefile renamed from board/spear/spear600/Makefile +14 -2
@@ -25,11 +25,23 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o +SOBJS-y := +COBJS-y := + ifndef CONFIG_SPL_BUILD -COBJS := spear600.o +SOBJS-y += spear_lowlevel_init.o +COBJS-y += spear_common.o +COBJS-$(CONFIG_MACH_X600) += x600.o +COBJS-$(CONFIG_MACH_X600) += x600fpga.o endif -SOBJS := +COBJS-$(CONFIG_MACH_SPEAR300EVB) += spear300evb.o +COBJS-$(CONFIG_MACH_SPEAR310EVB) += spear310evb.o +COBJS-$(CONFIG_MACH_SPEAR320EVB) += spear320plc.o +COBJS-$(CONFIG_MACH_SPEAR600EVB) += spear600evb.o + +COBJS := $(sort $(COBJS-y)) +SOBJS := $(sort $(SOBJS-y)) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS))
board/st/spear/config.mk renamed from board/spear/spear310/Makefile +3 -24
@@ -1,6 +1,6 @@ # -# (C) Copyright 2000-2004 -# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# Copyright (C) 2012 ST Microelectronics +# Vipin Kumar <[email protected]> # # See file CREDITS for list of people who contributed to this # project.
@@ -21,25 +21,4 @@ # MA 02111-1307 USA # -include $(TOPDIR)/config.mk - -LIB = $(obj)lib$(BOARD).o - -COBJS := spear310.o -SOBJS := - -SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -OBJS := $(addprefix $(obj),$(COBJS)) -SOBJS := $(addprefix $(obj),$(SOBJS)) - -$(LIB): $(obj).depend $(OBJS) $(SOBJS) - $(call cmd_link_o_target, $(OBJS) $(SOBJS)) - -######################################################################### - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### +ALL-y += $(obj)u-boot.img
board/st/spear/spear300evb.c renamed from board/spear/spear300/spear300.c +6 -6
@@ -31,20 +31,17 @@#include <asm/arch/generic.h> #include <asm/arch/misc.h> +#if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ]; +#endif -int board_init (void ) -{ -return spear_board_init (MACH_TYPE_SPEAR300 ); -} - +#if defined(CONFIG_CMD_NAND )/* * board_nand_init - Board specific NAND initialization * @nand: mtd private chip structure * * Called by nand_init_chip to initialize the board specific functions */ -void board_nand_init () { struct misc_regs *const misc_regs_p =
@@ -62,7 +59,9 @@ void board_nand_init()#endif return ; } +#endif +#if defined(CONFIG_CMD_NET )int board_eth_init (bd_t *bis) {int ret =0 ;
@@ -75,3 +74,4 @@ int board_eth_init(bd_t *bis)#endif return ret; } +#endif
board/st/spear/spear310evb.c renamed from board/spear/spear310/spear310.c +6 -6
@@ -32,20 +32,17 @@#include <asm/arch/generic.h> #include <asm/arch/misc.h> +#if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ]; +#endif -int board_init (void ) -{ -return spear_board_init (MACH_TYPE_SPEAR310 ); -} - +#if defined(CONFIG_CMD_NAND )/* * board_nand_init - Board specific NAND initialization * @nand: mtd private chip structure * * Called by nand_init_chip to initialize the board specific functions */ -void board_nand_init () { struct misc_regs *const misc_regs_p =
@@ -63,7 +60,9 @@ void board_nand_init()#endif return ; } +#endif +#if defined(CONFIG_CMD_NET )int board_eth_init (bd_t *bis) {int ret =0 ;
@@ -93,3 +92,4 @@ int board_eth_init(bd_t *bis)#endif return ret; } +#endif
board/st/spear/spear320plc.c renamed from board/spear/spear320/spear320.c +7 -4
@@ -35,7 +35,9 @@#define PLGPIO_SEL_36 0xb3000028#define PLGPIO_IO_36 0xb3000038 +#if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ]; +#endif static void spear_phy_reset (void ) {
@@ -46,23 +48,22 @@ static void spear_phy_reset(void)int board_init (void ) {spear_phy_reset (); -return spear_board_init (MACH_TYPE_SPEAR320 ); +return 0 ; } +#if defined(CONFIG_CMD_NAND )/* * board_nand_init - Board specific NAND initialization * @nand: mtd private chip structure * * Called by nand_init_chip to initialize the board specific functions */ -void board_nand_init () {struct misc_regs *const misc_regs_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ;struct nand_chip *nand = &nand_chip[0 ]; -#if defined(CONFIG_NAND_FSMC ) if (((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) == MISC_SOCCFG30) || ((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
@@ -70,11 +71,12 @@ void board_nand_init() fsmc_nand_init(nand); } -#endif return ; } +#endif +#if defined(CONFIG_CMD_NET )int board_eth_init (bd_t *bis) {int ret =0 ;
@@ -92,3 +94,4 @@ int board_eth_init(bd_t *bis)#endif return ret; } +#endif
board/st/spear/spear600evb.c renamed from board/spear/spear600/spear600.c +6 -7
@@ -31,20 +31,17 @@#include <asm/arch/generic.h> #include <asm/arch/misc.h> +#if defined(CONFIG_CMD_NAND )static struct nand_chip nand_chip[CONFIG_SYS_MAX_NAND_DEVICE ]; +#endif -int board_init (void ) -{ -return spear_board_init (MACH_TYPE_SPEAR600 ); -} - +#if defined(CONFIG_CMD_NAND )/* * board_nand_init - Board specific NAND initialization * @nand: mtd private chip structure * * Called by nand_init_chip to initialize the board specific functions */ -void board_nand_init () { struct misc_regs *const misc_regs_p =
@@ -57,11 +54,12 @@ void board_nand_init()#endif return ; } +#endif +#if defined(CONFIG_CMD_NET )int board_eth_init (bd_t *bis) {int ret =0 ; -#if defined(CONFIG_DESIGNWARE_ETH )u32 interface =PHY_INTERFACE_MODE_MII ;#if defined(CONFIG_DW_AUTONEG )
@@ -73,3 +71,4 @@ int board_eth_init(bd_t *bis)#endif return ret; } +#endif
board/st/spear/spear_common.c renamed from board/spear/common/spr_misc.c +4 -30
@@ -39,21 +39,18 @@ DECLARE_GLOBAL_DATA_PTR;#if defined(CONFIG_CMD_NET )static int i2c_read_mac (uchar *buffer);#endif +void lowlevel_init (void ) +{ +}int dram_init (void ) {/* Store complete RAM size and return */ - gd->ram_size =get_ram_size (PHYS_SDRAM_1 ,PHYS_SDRAM_1_MAXSIZE ); + gd->ram_size =get_ram_size (CONFIG_SYS_SDRAM_BASE ,SDRAM_MAX_SIZE );return 0 ; } -void dram_init_banksize (void ) -{ - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size = gd->ram_size; -} -int board_early_init_f () {#if defined(CONFIG_ST_SMI )
@@ -61,27 +58,6 @@ int board_early_init_f()#endif return 0 ; } -int misc_init_r (void ) -{ -#if defined(CONFIG_CMD_NET ) -uchar mac_id[6 ]; - -if (!eth_getenv_enetaddr ("ethaddr" , mac_id) && !i2c_read_mac (mac_id)) -eth_setenv_enetaddr ("ethaddr" , mac_id); -#endif -setenv ("verify" ,"n" ); - -#if defined(CONFIG_SPEAR_USBTTY ) -setenv ("stdin" ,"usbtty" ); -setenv ("stdout" ,"usbtty" ); -setenv ("stderr" ,"usbtty" ); - -#ifndef CONFIG_SYS_NO_DCACHE -dcache_enable (); -#endif -#endif -return 0 ; -}#ifdef CONFIG_SPEAR_EMI struct cust_emi_para {
@@ -140,8 +116,6 @@ void spear_emi_init(void)int spear_board_init (ulong mach_type) { - gd->bd->bi_arch_number = mach_type; -/* adress of boot parameters */ gd->bd->bi_boot_params =CONFIG_BOOT_PARAMS_ADDR ;
board/st/spear/spear_lowlevel_init.S renamed from board/spear/common/spr_lowlevel_init.S +0 -0
board/st/spear/x600.c renamed from board/spear/x600/x600.c +0 -0
board/st/spear/x600fpga.c renamed from board/spear/x600/fpga.c +0 -0
board/st/spear/x600fpga.h renamed from board/spear/x600/fpga.h +0 -0
boards.cfg +15 -13
@@ -198,19 +198,21 @@ omap730p2_cs0boot arm arm926ejs omap730p2 ti omap omap730p2_cs3boot arm arm926ejs omap730p2 ti omap omap730p2:CS3_BOOT edminiv2 arm arm926ejs - LaCie orion5x dkb arm arm926ejs - Marvell pantheon -spear300 arm arm926ejs spear300 spear spear spear3xx_evb:spear300 -spear300_nand arm arm926ejs spear300 spear spear spear3xx_evb:spear300,nand -spear300_usbtty arm arm926ejs spear300 spear spear spear3xx_evb:spear300,usbtty -spear310 arm arm926ejs spear310 spear spear spear3xx_evb:spear310 -spear310_pnor arm arm926ejs spear310 spear spear spear3xx_evb:spear310,FLASH_PNOR -spear310_nand arm arm926ejs spear310 spear spear spear3xx_evb:spear310,nand -spear310_usbtty arm arm926ejs spear310 spear spear spear3xx_evb:spear310,usbtty -spear320 arm arm926ejs spear320 spear spear spear3xx_evb:spear320 -spear320_usbtty arm arm926ejs spear320 spear spear spear3xx_evb:spear320,usbtty -spear600 arm arm926ejs spear600 spear spear spear6xx_evb:spear600 -spear600_nand arm arm926ejs spear600 spear spear spear6xx_evb:spear600,nand -spear600_usbtty arm arm926ejs spear600 spear spear spear6xx_evb:spear600,usbtty -x600 arm arm926ejs - spear spear x600 +x600 arm arm926ejs - st spear x600 +spear300 arm arm926ejs spear st spear spear300-evb:spear300 +spear300_nand arm arm926ejs spear st spear spear300-evb:spear300,nand +spear300_usbtty arm arm926ejs spear st spear spear300-evb:spear300,usbtty +spear310 arm arm926ejs spear st spear spear310-evb:spear310 +spear310_pnor arm arm926ejs spear st spear spear310-evb:spear310,pnor +spear310_nand arm arm926ejs spear st spear spear310-evb:spear310,nand +spear310_usbtty arm arm926ejs spear st spear spear310-evb:spear310,usbtty +spear320 arm arm926ejs spear st spear spear320-evb:spear320 +spear320_pnor arm arm926ejs spear st spear spear320-evb:spear320,pnor +spear320_nand arm arm926ejs spear st spear spear320-evb:spear320,nand +spear320_usbtty arm arm926ejs spear st spear spear320-evb:spear320,usbtty +spear600 arm arm926ejs spear st spear spear600-evb:spear600 +spear600_nand arm arm926ejs spear st spear spear600-evb:spear600,nand +spear600_usbtty arm arm926ejs spear st spear spear600-evb:spear600,usbtty versatileab arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_AB versatilepb arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_PB versatileqemu arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_QEMU,ARCH_VERSATILE_PB
Signature · 1 line
1.7.11.4
PATCH 5/11 spear: Append MISC_ as prefix to misc register bitmasks
In reply to Vipin Kumar--- arch/arm/cpu/arm926ejs/spear/cpu.c | 4 ++-- arch/arm/cpu/arm926ejs/spear/spear600.c | 22 +++++++++------------- arch/arm/include/asm/arch-spear/misc.h | 10 ++++++++-- 3 files changed, 19 insertions(+), 17 deletions(-)
arch/arm/cpu/arm926ejs/spear/cpu.c +2 -2
@@ -44,8 +44,8 @@ int arch_cpu_init(void) periph1_clken |=MISC_UART0ENB ; periph_clk_cfg =readl (&misc_p->periph_clk_cfg); - periph_clk_cfg &= ~CONFIG_SPEAR_UARTCLKMSK ; - periph_clk_cfg |=CONFIG_SPEAR_UART48M ; + periph_clk_cfg &= ~MISC_UARTCLKMSK ; + periph_clk_cfg |=MISC_UART48M ;writel (periph_clk_cfg, &misc_p->periph_clk_cfg);#endif #if defined(CONFIG_DESIGNWARE_ETH )
arch/arm/cpu/arm926ejs/spear/spear600.c +9 -13
@@ -138,8 +138,9 @@ void soc_init(void)*/ static u32 read_bootstrap (void ) { -return (readl (CONFIG_SPEAR_BOOTSTRAPCFG ) >>CONFIG_SPEAR_BOOTSTRAPSHFT ) - &CONFIG_SPEAR_BOOTSTRAPMASK ; +struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ; + +return readl (&misc_p->auto_cfg_reg) &MISC_BOOTSTRAPMASK ; }int snor_boot_selected (void )
@@ -148,16 +149,13 @@ int snor_boot_selected(void)if (SNOR_BOOT_SUPPORTED ) {/* Check whether SNOR boot is selected */ -if ((bootstrap &CONFIG_SPEAR_ONLYSNORBOOT ) == -CONFIG_SPEAR_ONLYSNORBOOT ) +if ((bootstrap &MISC_ONLYSNORBOOT ) ==MISC_ONLYSNORBOOT )return TRUE; -if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) == -CONFIG_SPEAR_NORNAND8BOOT ) +if ((bootstrap &MISC_NORNANDBOOT ) ==MISC_NORNAND8BOOT )return TRUE; -if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) == -CONFIG_SPEAR_NORNAND16BOOT ) +if ((bootstrap &MISC_NORNANDBOOT ) ==MISC_NORNAND16BOOT )return TRUE; }
@@ -170,12 +168,10 @@ int nand_boot_selected(void)if (NAND_BOOT_SUPPORTED ) {/* Check whether NAND boot is selected */ -if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) == -CONFIG_SPEAR_NORNAND8BOOT ) +if ((bootstrap &MISC_NORNANDBOOT ) ==MISC_NORNAND8BOOT )return TRUE; -if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) == -CONFIG_SPEAR_NORNAND16BOOT ) +if ((bootstrap &MISC_NORNANDBOOT ) ==MISC_NORNAND16BOOT )return TRUE; }
@@ -194,7 +190,7 @@ int usb_boot_selected(void)if (USB_BOOT_SUPPORTED ) {/* Check whether USB boot is selected */ -if (!(bootstrap &CONFIG_SPEAR_USBBOOT )) +if (!(bootstrap &MISC_USBBOOT ))return TRUE; }
arch/arm/include/asm/arch-spear/misc.h +8 -2
@@ -137,12 +137,18 @@ struct misc_regs {#define MISC_SOCCFG30 0x0000000C#define MISC_SOCCFG31 0x0000000D#define MISC_NANDDIS 0x00020000 +#define MISC_BOOTSTRAPMASK 0x000B0000 +#define MISC_ONLYSNORBOOT 0x000A0000 +#define MISC_NORNANDBOOT 0x000B0000 +#define MISC_NORNAND8BOOT 0x00080000 +#define MISC_NORNAND16BOOT 0x00090000 +#define MISC_USBBOOT 0x00080000/* PERIPH_CLK_CFG value */ #define MISC_GPT3SYNTH 0x00000400#define MISC_GPT4SYNTH 0x00000800 -#define CONFIG_SPEAR_UART48M 0 -#define CONFIG_SPEAR_UARTCLKMSK (0x1 << 4) +#define MISC_UART48M 0x00000000 +#define MISC_UARTCLKMSK 0x00000010/* PRSC_CLK_CFG value */ /*
Signature · 1 line
1.7.11.4
PATCH 6/11 spear: Read ethaddr from I2C memory
In reply to Vipin Kumarspear600evb and spear300evb place ethaddr on a I2C memory. This patch cleans up reading of ethaddr
--- board/st/spear/spear300evb.c | 5 ++++ board/st/spear/spear600evb.c | 7 ++++++ board/st/spear/spear_common.c | 55 +++++++++++++++++++++++++++---------------- 3 files changed, 47 insertions(+), 20 deletions(-)
board/st/spear/spear300evb.c +5 -0
@@ -68,6 +68,11 @@ int board_eth_init(bd_t *bis)#if defined(CONFIG_DESIGNWARE_ETH )u32 interface =PHY_INTERFACE_MODE_MII ; +#if defined(CONFIG_SPEAR_MACID_IN_I2CMEM ) +uchar mac_id[6 ]; +if (!eth_getenv_enetaddr ("ethaddr" , mac_id) && !i2c_read_mac (mac_id)) +eth_setenv_enetaddr ("ethaddr" , mac_id); +#endif if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY , interface) >=0 ) ret++;
board/st/spear/spear600evb.c +7 -0
@@ -60,11 +60,18 @@ void board_nand_init()int board_eth_init (bd_t *bis) {int ret =0 ; +#if defined(CONFIG_SPEAR_MACID_IN_I2CMEM ) +uchar mac_id[6 ]; +#endif #if defined(CONFIG_DESIGNWARE_ETH )u32 interface =PHY_INTERFACE_MODE_MII ;#if defined(CONFIG_DW_AUTONEG ) interface =PHY_INTERFACE_MODE_GMII ;#endif +#if defined(CONFIG_SPEAR_MACID_IN_I2CMEM ) +if (!eth_getenv_enetaddr ("ethaddr" , mac_id) && !i2c_read_mac (mac_id)) +eth_setenv_enetaddr ("ethaddr" , mac_id); +#endif if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY , interface) >=0 ) ret++;
board/st/spear/spear_common.c +35 -20
119 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 7/11 spear: Cleanup SoC area
In reply to Vipin Kumar- Place emi init in soc area
- Move smi and emi controller initializations to arch_cpu_init
--- arch/arm/cpu/arm926ejs/spear/Makefile | 2 + arch/arm/cpu/arm926ejs/spear/cpu.c | 37 +++++++++++++++- arch/arm/cpu/arm926ejs/spear/emi.c | 80 +++++++++++++++++++++++++++++++++++ arch/arm/cpu/arm926ejs/spear/spl.c | 35 --------------- board/st/spear/spear_common.c | 75 -------------------------------- 5 files changed, 118 insertions(+), 111 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/emi.c
arch/arm/cpu/arm926ejs/spear/Makefile +2 -0
@@ -29,6 +29,8 @@ COBJS-y := cpu.o \ reset.o \ timer.o +COBJS-$(CONFIG_ST_EMI) += emi.o + ifdef CONFIG_SPL_BUILD COBJS-y += spl.o spl_boot.o COBJS-$(CONFIG_SPEAR600) += spear600.o
arch/arm/cpu/arm926ejs/spear/cpu.c +36 -1
@@ -22,16 +22,41 @@*/ #include <common.h> +#include <linux/mtd/st_smi.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/misc.h> +#if defined(CONFIG_ARCH_SPEAR6XX ) +static void mac_init (void ) +{ +struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ; + +writel (readl (&misc_p->periph1_clken) & ~MISC_ETHENB , + &misc_p->periph1_clken); + +writel (MISC_SYNTH23 , &misc_p->gmac_synth_clk); +writel (0x0 , &misc_p->gmac_ctr_reg); + +writel (readl (&misc_p->periph1_clken) |MISC_ETHENB , + &misc_p->periph1_clken); + +writel (readl (&misc_p->periph1_rst) |MISC_ETHENB , + &misc_p->periph1_rst); +writel (readl (&misc_p->periph1_rst) & ~MISC_ETHENB , + &misc_p->periph1_rst); +} +#endif +int arch_cpu_init (void ) {struct misc_regs *const misc_p = - (struct misc_regs *)CONFIG_SPEAR_MISCBASE ; + (struct misc_regs *)CONFIG_SPEAR_MISCBASE ;u32 periph1_clken, periph_clk_cfg; +#if defined(CONFIG_ARCH_SPEAR6XX ) +mac_init (); +#endif periph1_clken =readl (&misc_p->periph1_clken);#if defined(CONFIG_ARCH_SPEAR3XX )
@@ -65,6 +90,16 @@ int arch_cpu_init(void)#endif writel (periph1_clken, &misc_p->periph1_clken); + +/* Early driver initializations */ +#if defined(CONFIG_ST_SMI ) +smi_init (); +#endif + +#ifdef CONFIG_ST_EMI +emi_init (); +#endif +return 0 ; }
arch/arm/cpu/arm926ejs/spear/emi.c new file +80 -0
80 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spl.c +0 -35
@@ -128,41 +128,6 @@ static void pll_init(void) ; } -static void mac_init (void ) -{ -struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ; - -writel (readl (&misc_p->periph1_clken) & (~PERIPH_GMAC ), - &misc_p->periph1_clken); - -writel (SYNTH23 , &misc_p->gmac_synth_clk); - -switch (get_socrev ()) { -case SOC_SPEAR600_AA : -case SOC_SPEAR600_AB : -case SOC_SPEAR600_BA : -case SOC_SPEAR600_BB : -case SOC_SPEAR600_BC : -case SOC_SPEAR600_BD : -writel (0x0 , &misc_p->gmac_ctr_reg); -break ; - -case SOC_SPEAR300 : -case SOC_SPEAR310 : -case SOC_SPEAR320 : -writel (0x4 , &misc_p->gmac_ctr_reg); -break ; - } - -writel (readl (&misc_p->periph1_clken) |PERIPH_GMAC , - &misc_p->periph1_clken); - -writel (readl (&misc_p->periph1_rst) |PERIPH_GMAC , - &misc_p->periph1_rst); -writel (readl (&misc_p->periph1_rst) & (~PERIPH_GMAC ), - &misc_p->periph1_rst); -} -static void sys_init (void ) {struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ;
board/st/spear/spear_common.c +0 -75
87 lines not on this page · raw message
Signature · 1 line
1.7.11.4
PATCH 8/11 spear/spl: Cleanup spear SPL
In reply to Vipin KumarThis patch cleans up the spear SPL support. The modifications include
- Move mpmc register programing values to board dir
MPMC register programming values are dependent on DDR timings which in turn depend a lot on the placement of DDR chip on the board. It makes more sense to keep these register init values in board
- Add SPEAR to the CONFIG_DDR namespace
Add SPEAR to the CONFIG_DDR namespace to make it exclusive to SPEAr platfroms only
- Add hardware configurations for spear600 spl support
- Avoid console operations during spl
The spl runs in the environment provided by boot code. The Boot code may or may not initialize UART (padmux, clock etc). This mandates the SPL to initialize UART to dump information
SPEAr SPL as a policy initializes only the system and ddr
- Do not copy the header arbitrarily
The current logic is copying the header at 64 bytes before the load address. This can lead to unpredictable results as that memory is reserved to be bss/rw area
Modify the logic to use a local structure for image header
- Rename spear600.c to spl-spear600.c
- Use the smi_init routine from smi driver
- Perform Data CRC check on relocated image
image_check_dcrc accepts a header pointer as an argument and performs a data crc check based on the assumption that the image data is placed immediately after the header. The SPEAr SPL support performs the data verification after relocation to RAM has taken place. There are at least following two benefits of doing so
* It is faster in Normal booting cases It also leads to a basic DDR test
* because the code gets copied to the recently
initialized DDR and it works like a read-write test for RAM before the control is actually transfered to u-boot
- Implement independent routines for get_socrev()
- Rename register bitmask definitions
- Simplify lds file
- Use ENTRY/ENDPROC macros and clear bss
--- arch/arm/cpu/arm926ejs/spear/Makefile | 6 +- arch/arm/cpu/arm926ejs/spear/spear600.c | 232 --------------------- arch/arm/cpu/arm926ejs/spear/spl-spear3xx.c | 35 ++++ arch/arm/cpu/arm926ejs/spear/spl-spear600.c | 98 +++++++++ arch/arm/cpu/arm926ejs/spear/spl.c | 140 ++++--------- arch/arm/cpu/arm926ejs/spear/spl_boot.c | 84 +++----- arch/arm/cpu/arm926ejs/spear/start.S | 58 +++--- arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 65 ++---- arch/arm/include/asm/arch-spear/generic.h | 88 ++++++-- arch/arm/include/asm/arch-spear/misc.h | 191 +++++------------ arch/arm/include/asm/arch-spear/spear600.h | 13 ++ arch/arm/include/asm/arch-spear/syscntl.h | 21 +- board/st/spear/config.mk | 6 + board/st/spear/ddr/Makefile | 57 +++++ .../ddr/spear600_mt47h128m8_3_266_cl5_async.c | 3 +- .../spear/ddr/spear600_mt47h32m16_333_cl5_psync.c | 8 +- .../ddr/spear600_mt47h32m16_37e_166_cl4_sync.c | 3 +- .../ddr/spear600_mt47h64m16_3_333_cl5_psync.c | 8 +- board/st/spear/spear600evb.c | 91 ++++++++ include/configs/spear600.h | 11 + spl/Makefile | 4 + 21 files changed, 578 insertions(+), 644 deletions(-) delete mode 100644 arch/arm/cpu/arm926ejs/spear/spear600.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spl-spear3xx.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spl-spear600.c create mode 100644 board/st/spear/ddr/Makefile rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c => board/st/spear/ddr/spear600_mt47h128m8_3_266_cl5_async.c (95%) rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c => board/st/spear/ddr/spear600_mt47h32m16_333_cl5_psync.c (91%) rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c => board/st/spear/ddr/spear600_mt47h32m16_37e_166_cl4_sync.c (95%) rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c => board/st/spear/ddr/spear600_mt47h64m16_3_333_cl5_psync.c (91%)
arch/arm/cpu/arm926ejs/spear/Makefile +1 -5
@@ -33,11 +33,7 @@ COBJS-$(CONFIG_ST_EMI) += emi.o ifdef CONFIG_SPL_BUILD COBJS-y += spl.o spl_boot.o -COBJS-$(CONFIG_SPEAR600) += spear600.o -COBJS-$(CONFIG_DDR_MT47H64M16) += spr600_mt47h64m16_3_333_cl5_psync.o -COBJS-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_333_cl5_psync.o -COBJS-$(CONFIG_DDR_MT47H32M16) += spr600_mt47h32m16_37e_166_cl4_sync.o -COBJS-$(CONFIG_DDR_MT47H128M8) += spr600_mt47h128m8_3_266_cl5_async.o +COBJS-$(CONFIG_SOC_SPEAR600) += spl-spear600.o endif SRCS := $(START:.o=.S) $(COBJS-y:.o=.c)
arch/arm/cpu/arm926ejs/spear/spear600.c deleted +0 -232
232 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spl-spear3xx.c new file +35 -0
@@ -0,0 +1,35 @@ +/* +* (C) Copyright 2012 +* Vipin Kumar, ST Microelectronics, vipin.kumar at st.com +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> + +int get_socrev (void ) +{ +#if defined(CONFIG_SOC_SPEAR300 ) +return SOC_SPEAR300 ; +#elif defined(CONFIG_SOC_SPEAR310 ) +return SOC_SPEAR310 ; +#elif defined(CONFIG_SOC_SPEAR320 ) +return SOC_SPEAR320 ; +#endif +}
arch/arm/cpu/arm926ejs/spear/spl-spear600.c new file +98 -0
98 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spl.c +37 -103
213 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spl_boot.c +32 -52
143 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/start.S +26 -32
93 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds +15 -50
78 lines not on this page · raw message
arch/arm/include/asm/arch-spear/generic.h +76 -12
97 lines not on this page · raw message
arch/arm/include/asm/arch-spear/misc.h +50 -141
220 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spear600.h +13 -0
@@ -32,7 +32,10 @@#define CONFIG_SYS_PLUG_BASE 0xE1200000#define CONFIG_SYS_UHC0_EHCI_BASE 0xE1800000#define CONFIG_SYS_SMI_BASE 0xFC000000 +#define CONFIG_SPEAR_MPMCBASE 0xFC600000 +#define CONFIG_SPEAR_MPMCREGS 100 +#define CONFIG_SPEAR_TIMERBASE 0xFC800000#define CONFIG_SPEAR_SYSCNTLBASE 0xFCA00000#define CONFIG_SPEAR_MISCBASE 0xFCA80000
@@ -42,4 +45,14 @@#define CONFIG_SYS_NAND_CLE (1 << 16)#define CONFIG_SYS_NAND_ALE (1 << 17) +#define SNOR_BOOT_SUPPORTED 1 +#define NAND_BOOT_SUPPORTED 1 +#define PNOR_BOOT_SUPPORTED 0 +#define USBD_BOOT_SUPPORTED 1 +#define TFTP_BOOT_SUPPORTED 0 +#define UART_BOOT_SUPPORTED 0 +#define MMC_BOOT_SUPPORTED 0 +#define SPI_BOOT_SUPPORTED 0 +#define I2C_BOOT_SUPPORTED 0 +#endif
arch/arm/include/asm/arch-spear/syscntl.h +12 -9
@@ -21,8 +21,8 @@* MA 02111-1307 USA */ -#ifndef __SYSCTRL_H -#define __SYSCTRL_H +#ifndef ASM_ARCH_SPEAR_SYSCTRL_H +#define ASM_ARCH_SPEAR_SYSCTRL_H struct syscntl_regs { u32 scctrl;
@@ -40,13 +40,16 @@ struct syscntl_regs { const u32 scperstat; }; -#define MODE_SHIFT 0x00000003 +#define SYSCNTL_STATE_MASK (0x07 << 3) +#define SYSCNTL_STATE_NORMAL (0x04 << 3) +#define SYSCNTL_STATE_SLOW (0x02 << 3) +#define SYSCNTL_STATE_DOZE (0x01 << 3) +#define SYSCNTL_STATE_SLEEP (0x00 << 3) +#define SYSCNTL_REQ_NORMAL (0x04 << 0) +#define SYSCNTL_REQ_SLOW (0x02 << 0) +#define SYSCNTL_REQ_DOZE (0x01 << 0) +#define SYSCNTL_REQ_SLEEP (0x00 << 0) -#define NORMAL 0x00000004 -#define SLOW 0x00000002 -#define DOZE 0x00000001 -#define SLEEP 0x00000000 - -#define PLL_TIM 0x01FFFFFF +#define SYSCNTL_PLL_TIM 0x01FFFFFF#endif
board/st/spear/config.mk +6 -0
@@ -21,4 +21,10 @@ # MA 02111-1307 USA # +ifndef CONFIG_SPL_BUILD ALL-y += $(obj)u-boot.img + +ifdef CONFIG_MACH_SPEAR600EVB +ALL-y += $(obj)spl/u-boot-spl.img +endif +endif
board/st/spear/ddr/Makefile new file +57 -0
57 lines not on this page · raw message
board/st/spear/ddr/spear600_mt47h128m8_3_266_cl5_async.c renamed from arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c +2 -1
@@ -22,8 +22,9 @@*/ #include <common.h> +#include <asm/arch/hardware.h> -#if (CONFIG_DDR_PLL2 ) +#if defined(CONFIG_ARCH_SPEAR6XX ) && defined(CONFIG_SPEAR_DDR_PLL2 )const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS ] = { 0x00000001,
board/st/spear/ddr/spear600_mt47h32m16_333_cl5_psync.c renamed from arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c +5 -3
@@ -22,14 +22,16 @@*/ #include <common.h> +#include <asm/arch/hardware.h> -#if (CONFIG_DDR_PLL2 || CONFIG_DDR_2HCLK) +#if defined(CONFIG_ARCH_SPEAR6XX ) && \ + (defined(CONFIG_SPEAR_DDR_PLL2 ) || defined(CONFIG_SPEAR_DDR_2HCLK )) const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS] = { -#if (CONFIG_DDR_PLL2) +#if defined(CONFIG_SPEAR_DDR_PLL2 ) 0x00000001, 0x00000000, -#elif (CONFIG_DDR_2HCLK) +#elif defined(CONFIG_SPEAR_DDR_2HCLK ) 0x02020201, 0x02020202,#endif
board/st/spear/ddr/spear600_mt47h32m16_37e_166_cl4_sync.c renamed from arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c +2 -1
@@ -22,8 +22,9 @@*/ #include <common.h> +#include <asm/arch/hardware.h> -#if (CONFIG_DDR_HCLK ) +#if defined(CONFIG_ARCH_SPEAR6XX ) && defined(CONFIG_SPEAR_DDR_HCLK )const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS ] = { 0x03030301,
board/st/spear/ddr/spear600_mt47h64m16_3_333_cl5_psync.c renamed from arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c +5 -3
@@ -22,14 +22,16 @@*/ #include <common.h> +#include <asm/arch/hardware.h> -#if (CONFIG_DDR_PLL2 || CONFIG_DDR_2HCLK) +#if defined(CONFIG_ARCH_SPEAR6XX ) && \ + (defined(CONFIG_SPEAR_DDR_PLL2 ) || defined(CONFIG_SPEAR_DDR_2HCLK )) const u32 mpmc_conf_vals[CONFIG_SPEAR_MPMCREGS] = { -#if (CONFIG_DDR_PLL2) +#if defined(CONFIG_SPEAR_DDR_PLL2 ) 0x00000001, 0x00000000, -#elif (CONFIG_DDR_2HCLK) +#elif defined(CONFIG_SPEAR_DDR_2HCLK ) 0x02020201, 0x02020202,#endif
board/st/spear/spear600evb.c +91 -0
94 lines not on this page · raw message
include/configs/spear600.h +11 -0
@@ -54,5 +54,16 @@#define CONFIG_SYS_INIT_SP_ADDR (0xD2800000 + 0x2000 - \ GENERATED_GBL_DATA_SIZE) +/* SPL configurations */ +#if defined(CONFIG_SPL ) +#define CONFIG_SPL_NO_CPU_SUPPORT_CODE +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT +#define CONFIG_SPL_MTD_SUPPORT +#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/spear" +#define CONFIG_SPL_LDSCRIPT \ + "arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds" +#endif +#include <configs/spear.h> #endif /* __CONFIG_SPEAR600_H */
spl/Makefile +4 -0
@@ -61,6 +61,10 @@ LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/libnet.o LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/libnet.o LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/libphy.o +ifeq ($(BOARD),spear) +LIBS-y += board/$(BOARDDIR)/ddr/lib$(BOARD)ddr.o +endif + ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),) LIBS-y += $(CPUDIR)/omap-common/libomap-common.o endif
Signature · 1 line
1.7.11.4
PATCH 9/11 spear: Add POST memory support
In reply to Vipin KumarThe xloader had a basic pattern read/write test with in itself. With the source upgrading to SPL, it is now more convenient to use the Power On Self Test for memory supported by u-boot.
This patch adds the support for memory POST test.
--- arch/arm/cpu/arm926ejs/spear/cpu.c | 30 ++++++++++++++++++++++++++++++ include/configs/spear.h | 2 ++ 2 files changed, 32 insertions(+)
arch/arm/cpu/arm926ejs/spear/cpu.c +30 -0
@@ -120,3 +120,33 @@ int print_cpuinfo(void) return 0; }#endif + +#ifdef CONFIG_POST +int arch_memory_test_prepare (u32 *vstart,u32 *size,phys_addr_t *phys_offset) +{ +/* +* Run the POST test on 64 MB memory starting from CONFIG_SYS_LOAD_ADDR +* The assumption here is that the DDR present on board is >= 128MB. +* +* The test runs before relocation (after the code copy has taken +* place), so it can not touch either before or after relocation areas +* of U-boot +* +* DDR usage +* <--------->|<---------------- / --------------->|<----------> +* U-boot Area to be used for U-boot +* before POST test after +* relocation relocation +*/ + + *vstart =CONFIG_SYS_LOAD_ADDR ; + *size =64 <<20 ; + +return 0 ; +} + +void arch_memory_failure_handle (void ) +{ +hang (); +} +#endif
include/configs/spear.h +2 -0
@@ -154,6 +154,8 @@/* Miscellaneous configurable options */ #define CONFIG_ARCH_CPU_INIT #define CONFIG_DISPLAY_CPUINFO +#define CONFIG_POST CONFIG_SYS_POST_MEMORY +#define CONFIG_SYS_POST_WORD_ADDR 0x0#define CONFIG_OF_LIBFDT #define CONFIG_CMDLINE_TAG
Signature · 1 line
1.7.11.4
PATCH 10/11 spear: Enable ehci support
In reply to Vipin Kumar--- arch/arm/cpu/arm926ejs/spear/Makefile | 2 ++ arch/arm/cpu/arm926ejs/spear/cpu.c | 3 +++ arch/arm/cpu/arm926ejs/spear/spear3xx.c | 43 +++++++++++++++++++++++++++++++ arch/arm/cpu/arm926ejs/spear/spear6xx.c | 43 +++++++++++++++++++++++++++++++ arch/arm/include/asm/arch-spear/generic.h | 3 +++ drivers/usb/host/ehci-spear.c | 9 ++++++- 6 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/spear3xx.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear6xx.c
arch/arm/cpu/arm926ejs/spear/Makefile +2 -0
@@ -30,6 +30,8 @@ COBJS-y := cpu.o \ timer.o COBJS-$(CONFIG_ST_EMI) += emi.o +COBJS-$(CONFIG_ARCH_SPEAR3XX) += spear3xx.o +COBJS-$(CONFIG_ARCH_SPEAR6XX) += spear6xx.o ifdef CONFIG_SPL_BUILD COBJS-y += spl.o spl_boot.o
arch/arm/cpu/arm926ejs/spear/cpu.c +3 -0
@@ -88,6 +88,9 @@ int arch_cpu_init(void)#if defined(CONFIG_NAND_FSMC ) periph1_clken |=MISC_FSMCENB ;#endif +#if defined(CONFIG_USB_EHCI_SPEAR ) + periph1_clken |=MISC_USBHENB ; +#endif writel (periph1_clken, &misc_p->periph1_clken);
arch/arm/cpu/arm926ejs/spear/spear3xx.c new file +43 -0
43 lines not on this page · raw message
arch/arm/cpu/arm926ejs/spear/spear6xx.c new file +43 -0
43 lines not on this page · raw message
arch/arm/include/asm/arch-spear/generic.h +3 -0
@@ -30,6 +30,9 @@ extern unsigned int setfreq_sz;extern void board_ddr_init (void );extern void board_lowlevel_late_init (void ); +extern void spear3xx_usbh_stop (void ); +extern void spear6xx_usbh_stop (void ); +extern u32 mpmc_conf_vals[];/*
drivers/usb/host/ehci-spear.c +8 -1
@@ -30,7 +30,7 @@#include <usb.h> #include "ehci.h" #include <asm/arch/hardware.h> - +#include <asm/arch/generic.h> /* * Create the appropriate control structures to manage
@@ -55,5 +55,12 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)*/ int ehci_hcd_stop (int index) { +#if defined(CONFIG_ARCH_SPEAR3XX ) +spear3xx_usbh_stop (); +#elif defined(CONFIG_ARCH_SPEAR6XX ) +spear6xx_usbh_stop (); +#else +#error No spear platforms defined +#endif return 0 ; }
Signature · 1 line
1.7.11.4
PATCH 11/11 spear3xx: FIX: Enable access to memory for spear310 and spear320
In reply to Vipin KumarThe memory access to RAS is necessary for the operation of the peripherals instantiated inside RAS. Enable this clock to make macb work
--- arch/arm/cpu/arm926ejs/spear/cpu.c | 5 +++++ arch/arm/include/asm/arch-spear/misc.h | 3 +++ 2 files changed, 8 insertions(+)
arch/arm/cpu/arm926ejs/spear/cpu.c +5 -0
@@ -94,6 +94,11 @@ int arch_cpu_init(void)writel (periph1_clken, &misc_p->periph1_clken); +#if defined(CONFIG_SOC_SPEAR310 ) || defined(CONFIG_SOC_SPEAR320 ) +writel (readl (&misc_p->amem_cfg_ctrl) |MISC_AMEM_CLKENB , + &misc_p->amem_cfg_ctrl); +#endif +/* Early driver initializations */ #if defined(CONFIG_ST_SMI )smi_init ();
arch/arm/include/asm/arch-spear/misc.h +3 -0
@@ -157,6 +157,9 @@ struct misc_regs {#define MISC_PRISOCID_SHFT 16#define MISC_SECSOCID_SHFT 8 +/* amem_cfg_ctrl */ +#define MISC_AMEM_CLKENB 0x00000001 +/* synth_clk */ #define MISC_SYNTH23 0x00020003
Signature · 1 line
1.7.11.4
cover Enhance spear support
In reply to a message not in the archiveHi Vipin,
Quoted 5 lines · Vipin Kumar
This patchset is split in several pieces
- Drivers: This is essentially a few new drivers and fixes in already exiasting drivers
- Enhancement: This series enhances the already existing spear support
- spear13xx: This is a totally new suppoort for spear13xx architecture
Thanks for all these patches. This is a massive patch-set. I'll try to review at least some of them later this week. Please be patient.
But this amount of patches does raise a question that I discussed a time ago. If you continue to work on upstream U-Boot, which we greatly appreciate, then its perhaps better to create/add an SPEAr U-Boot custodian responsible for the SPEAr related patches. Reviewing, collecting patches and pushing them to Alberts ARM repository. This would take a bit of work from Albert, since without such an custodian all those SPEAr patches would fall into his area.
What do you guys think?
Albert, what are your thoughts on this?
Vipin, would you "volunteer" to eventually become this SPEAr U-Boot custodian? Or someone else?
Just my thought, comments welcome!
Thanks,
Stefan
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: office at denx.de
cover Enhance spear support
Quoted 20 lines · Stefan Roese
Hi Vipin,
Quoted 5 lines · Vipin Kumar
This patchset is split in several pieces
- Drivers: This is essentially a few new drivers and fixes in already exiasting drivers
- Enhancement: This series enhances the already existing spear support
- spear13xx: This is a totally new suppoort for spear13xx architectureThanks for all these patches. This is a massive patch-set. I'll try to review at least some of them later this week. Please be patient.
But this amount of patches does raise a question that I discussed a time ago. If you continue to work on upstream U-Boot, which we greatly appreciate, then its perhaps better to create/add an SPEAr U-Boot custodian responsible for the SPEAr related patches. Reviewing, collecting patches and pushing them to Alberts ARM repository. This would take a bit of work from Albert, since without such an custodian all those SPEAr patches would fall into his area.
Quoted 7 lines
What do you guys think?
Albert, what are your thoughts on this?
Vipin, would you "volunteer" to eventually become this SPEAr U-Boot custodian? Or someone else?
Yes, I can volunteer to be the SPEAr U-Boot custodian..
Regards
Vipin
Quoted 9 lines
Just my thought, comments welcome!
Thanks,
StefanDENX Software Engineering GmbH, MD: Wolfgang Denk& Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: office at denx.de
cover Enhance spear support
In reply to Stefan RoeseQuoted 20 lines · Stefan Roese
Hi Vipin,
Quoted 5 lines · Vipin Kumar
This patchset is split in several pieces
- Drivers: This is essentially a few new drivers and fixes in already exiasting drivers
- Enhancement: This series enhances the already existing spear support
- spear13xx: This is a totally new suppoort for spear13xx architectureThanks for all these patches. This is a massive patch-set. I'll try to review at least some of them later this week. Please be patient.
But this amount of patches does raise a question that I discussed a time ago. If you continue to work on upstream U-Boot, which we greatly appreciate, then its perhaps better to create/add an SPEAr U-Boot custodian responsible for the SPEAr related patches. Reviewing, collecting patches and pushing them to Alberts ARM repository. This would take a bit of work from Albert, since without such an custodian all those SPEAr patches would fall into his area.
Quoted 7 lines
What do you guys think?
Albert, what are your thoughts on this?
Vipin, would you "volunteer" to eventually become this SPEAr U-Boot custodian? Or someone else?
Yes, I volunteer to be the SPEAr U-Boot custodian..
Regards
Vipin
Quoted 9 lines
Just my thought, comments welcome!
Thanks,
StefanDENX Software Engineering GmbH, MD: Wolfgang Denk& Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: office at denx.de
A message that is not in the archive (sent off-list or not yet received): [email protected]
cover Enhance spear support
Quoted 7 lines · Armando Visconti
Ciao Stefan, Vipin,
Quoted 5 lines
Quoted 4 lines
Vipin, would you "volunteer" to eventually become this SPEAr U-Boot custodian? Or someone else?
Quoted 7 lines
Quoted 2 lines
Yes, I volunteer to be the SPEAr U-Boot custodian..
I think that no one else could to this custodian job better than Vipin...
Guaranteed!
I'm all for it. Lets see what Albert has to say here.
Albert, whats your opinion here? Would you also like to see an SPEAr custodian to offload your patch-queue a but? Or would you prefer to handle SPEAr related patches yourself in the future?
Thanks,
Stefan
cover Enhance spear support
Hi Stefan,
Quoted 14 lines · Stefan Roese
Quoted 13 lines · Armando Visconti
Ciao Stefan, Vipin,
Quoted 7 lines
Quoted 4 lines
Vipin, would you "volunteer" to eventually become this SPEAr U-Boot custodian? Or someone else?
Yes, I volunteer to be the SPEAr U-Boot custodian..
I think that no one else could to this custodian job better than Vipin...
Quoted 7 lines
Quoted 1 line
Guaranteed!
I'm all for it. Lets see what Albert has to say here.
Albert, whats your opinion here? Would you also like to see an SPEAr custodian to offload your patch-queue a but? Or would you prefer to handle SPEAr related patches yourself in the future?
I heartily welcome specialized ARM repositories and custodians. :)
Quoted 2 lines
Thanks,
Stefan
Amicalement,
Signature · 1 line
Albert.
cover Enhance spear support
Quoted 8 lines · Albert ARIBAUD
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
Yes, I volunteer to be the SPEAr U-Boot custodian..
I think that no one else could to this custodian job better than Vipin...
Guaranteed!
Quoted 7 lines
Quoted 5 lines
I'm all for it. Lets see what Albert has to say here.
Albert, whats your opinion here? Would you also like to see an SPEAr custodian to offload your patch-queue a but? Or would you prefer to handle SPEAr related patches yourself in the future?
I heartily welcome specialized ARM repositories and custodians. :)
Okay, its decided then. :)
Vipin, please send your public ssh key to Wolfgang so that we can create the new "spear" U-Boot git repository for you.
Thanks,
Stefan
cover Enhance spear support
Dear Stefan,
Quoted 3 lines · In message <[email protected]> you wrote:
Vipin, please send your public ssh key to Wolfgang so that we can create the new "spear" U-Boot git repository for you.
Will this be only SPEAr, or should we expect other chips fromSTM to go though it, too (so a more generic name like u-boot-stm would be better) ?
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You said you didn't want to use CGI.pm, but methinks you are needlessly reinventing the wheel, one spoke at a time. Either you are masochistic, or you just haven't seen enough of what CGI.pm can do for you. -- Randal L. Schwartz in <[email protected]>
cover Enhance spear support
Hi Wolfgang,
Quoted 10 lines · Wolfgang Denk
Dear Stefan,
Quoted 3 lines · In message <[email protected]> you wrote:
Vipin, please send your public ssh key to Wolfgang so that we can create the new "spear" U-Boot git repository for you.
Will this be only SPEAr, or should we expect other chips fromSTM to go though it, too (so a more generic name like u-boot-stm would be better) ?
Even if it's only SPEAr for now, I 'vote' for u-boot-stm.
Quoted 3 lines
Best regards,
Wolfgang Denk
Amicalement,
Signature · 1 line
Albert.
cover Enhance spear support
Quoted 8 lines · Albert ARIBAUD
Hi Wolfgang,
Quoted 4 lines · Wolfgang Denk
Dear Stefan,
Quoted 1 line · In message<[email protected]> you wrote:
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Vipin, please send your public ssh key to Wolfgang so that we can create the new "spear" U-Boot git repository for you.
Will this be only SPEAr, or should we expect other chips fromSTM to go though it, too (so a more generic name like u-boot-stm would be better) ?
Even if it's only SPEAr for now, I 'vote' for u-boot-stm.
It is only SPEAr for the moment, but I think that Vipin can be the custodian also for other stm devices...
Vipin, do you agree with that?
Rgds,
Arm
Signature · 8 lines
-- "Every step appears to be the unavoidable consequence of the -- preceding one." (A. Einstein) -- Armando Visconti Mobile: (+39) 346 8879146 Senior SW Engineer Fax: (+39) 02 93519290 CPG Work: (+39) 02 93519683 Computer System Division e-mail: armando.visconti at st.com ST Microelectronics TINA: 051 4683
cover Enhance spear support
In reply to Wolfgang DenkQuoted 7 lines · Wolfgang Denk
Dear Stefan,
Quoted 3 lines · In message<[email protected]> you wrote:
Vipin, please send your public ssh key to Wolfgang so that we can create the new "spear" U-Boot git repository for you.
Hello Wolfgang
Quoted 1 line
Will this be only SPEAr, or should we expect other chips fromSTM to go
Yes, it will only be for spear as of now
Quoted 3 lines
though it, too (so a more generic name like u-boot-stm would be better) ?
The ssh key is as below
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4FSMngFagc4TFNX5JoxxTmLe9oqUZcaILgs6OH8T2kOpxykq4tL30xzKPdTW5w++UT+N7GYJLaYvv0gaGg9d/GbunhBrHexBar8aYwz71uHQzOJ1Gpx4otbE1vZ5TOlOqecBGMTYXzHBRDdCCDWwwKgkLm6Q2ZlEXeo64q2RZ7iOCoWAUjHoXcNnNKtKI4D+JIVeONxCYYehbktPGznajpzXMHuOBS7wEXBj4U1ekv2YUI316b485KjYoufALeICoGQq3OCqxVH8FxgV1HfzVer1fimHYPjaHSAPRyDiNqxLj/s/ToBKuW+3UX+gM2ef9x0TXXGhoeXozXTxlyQyaw== vipink at DLH10018
Best Regards
Vipin
Quoted 4 lines
Best regards,
Wolfgang Denk
cover Enhance spear support
Dear Vipin,
Quoted 2 lines · In message <[email protected]> you wrote:
The ssh key is as below
THnaks a lot. The repository should be ready for your use now. Sorry it took so long.
Please feel free to contact me directly if there should be any problems.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I will also, for an appropriate fee, certify that your keyboard is object-oriented, and that the bits on your hard disk are template- compatible. - Jeffrey S. Haemer in <[email protected]>
cover Enhance spear support
Quoted 4 lines · Wolfgang Denk
Dear Vipin,
Quoted 1 line · In message<[email protected]> you wrote:
Quoted 8 lines
Quoted 1 line
The ssh key is as below
THnaks a lot. The repository should be ready for your use now. Sorry it took so long.
Please feel free to contact me directly if there should be any problems.
Wolfgang, Vipin,
Not sure what are next steps for this patchset.
Is someone going to review it, or part of it?
Or is Vipin expected to do something on the repository assigned to him (maybe he already did)?
Thx for clarifying it...
Rgds,
Arm
cover Enhance spear support
Dear Armando Visconti,
Quoted 6 lines · In message <[email protected]> you wrote:
Not sure what are next steps for this patchset.
Is someone going to review it, or part of it?Or is Vipin expected to do something on the repository assigned to him (maybe he already did)?
Vipin volunteered as custodian, so the next step should be that he performs a final review, applies the patches to his repo, and sends a pullr equest to Albert.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The philosophy exam was a piece of cake - which was a bit of a surprise, actually, because I was expecting some questions on a sheet of paper.
cover Enhance spear support
Quoted 7 lines · Wolfgang Denk
Dear Armando Visconti,
Quoted 4 lines · In message<[email protected]> you wrote:
Not sure what are next steps for this patchset.
Is someone going to review it, or part of it?
Quoted 7 lines
Quoted 2 lines
Or is Vipin expected to do something on the repository assigned to him (maybe he already did)?
Vipin volunteered as custodian, so the next step should be that he performs a final review, applies the patches to his repo, and sends a pullr equest to Albert.
Clear.
Ciao,
Arm
cover Enhance spear support
In reply to Wolfgang DenkQuoted 7 lines · Wolfgang Denk
Dear Armando Visconti,
Quoted 4 lines · In message<[email protected]> you wrote:
Not sure what are next steps for this patchset.
Is someone going to review it, or part of it?
Quoted 7 lines
Quoted 2 lines
Or is Vipin expected to do something on the repository assigned to him (maybe he already did)?
Vipin volunteered as custodian, so the next step should be that he performs a final review, applies the patches to his repo, and sends a pullr equest to Albert.
Yes, I am preparing the repository and I am going to send a pull request very soon
Thanks
Vipin
Quoted 4 lines
Best regards,
Wolfgang Denk
cover Enhance spear support
In reply to a message not in the archiveHello u-boot team,
Can you please provide some comments on this patch-set
Please consider this for inclusion
Regards
Vipin
Quoted 354 lines · Vipin KUMAR
This patchset is split in several pieces
- Drivers: This is essentially a few new drivers and fixes in already exiasting drivers
- Enhancement: This series enhances the already existing spear support
- spear13xx: This is a totally new suppoort for spear13xx architectureArmando Visconti (2):
mtd/st_smi: Add support for Micron N25Q128 Flash spi/arm-pl022: Add support for ARM PL022 spi controllerPratyush Anand (1):
usb/gadget/designware_otg: Add support for designware otgShiraz Hashim (3):
usbtty: adapt buffers for large packet support net/macb: Add arch specific routine to get mdio control net/macb: workaround for transmission hang issueVipin Kumar (40):
mtd/st_smi: Clear error flags while initiating a fresh write mtd/st_smi: Avoid issuing multiple WE commands mtd/st_smi: Write to flash in a tight loop
mtd/st_smi: Use page sizes respective to flash
usbh/ehci: Increase timeout for enumeration
sdhci: Add sdhci support for spear devices net/designware: Do not select MIIPORT for RGMII interface usb/host/ehci: Add support for EHCI on spear
misc/crypto: Add support for C3
armv7/ltimer: Add support for local timer on armv7 cpus
imls: Add support to list images in NAND device u-boot/spl: Add u-boot-spl.img to u-boot targets arm/boards: Define a new config optionCONFIG_BOOT_PARAMS_P
SPEAr: Remove extra spear board configurations spear/configs: Split config files hierarchically into plat, arch, soc
and board
spear/include: Clean up the spear include files spear/board: Cleanup spear related board files
spear: AppendMISC_as prefix to misc register bitmasks
spear: Read ethaddr from I2C memory
spear: Cleanup SoC area
spear/spl: Cleanup spear SPL
spear: Add POST memory support
spear: Enable ehci support
spear3xx: FIX: Enable access to memory for spear310 and spear320
spear: Add cache support
spear3xx: Add pinmux support
spear320plc: Correct the MACB interface
spear/configs: Modify several configurations
spear320: Add support for SD/MMC
spear320-hmi: Add support for hmi machine spear6xx/spear3xx: Add support to boot via NAND device spear/spl: Add support to boot from Parallel NOR device
spear300evb: Add SPL support
spear1340: Add support for spear1340 SoC
spear1310: Add support for spear1310 SoC
spear1340evb: Add support for evb machine
spear1310evb: Add support for evb machine
spear1340lcad: Add support for LCAD machine
spear1340evb: Add SPL support
spear1310evb: Add SPL supportMAINTAINERS | 4 + Makefile | 10 + README | 6 + arch/arm/cpu/arm926ejs/spear/Makefile | 26 +- arch/arm/cpu/arm926ejs/spear/cache.c | 32 + arch/arm/cpu/arm926ejs/spear/cpu.c | 93 +- arch/arm/cpu/arm926ejs/spear/emi.c | 80 ++ arch/arm/cpu/arm926ejs/spear/reset.c | 2 +- arch/arm/cpu/arm926ejs/spear/spear300.c | 140 +++ arch/arm/cpu/arm926ejs/spear/spear310.c | 162 +++ arch/arm/cpu/arm926ejs/spear/spear320.c | 860 ++++++++++++++++ arch/arm/cpu/arm926ejs/spear/spear3xx.c | 130 +++ arch/arm/cpu/arm926ejs/spear/spear600.c | 236 ----- arch/arm/cpu/arm926ejs/spear/spear6xx.c | 43 + arch/arm/cpu/arm926ejs/spear/spl-spear3xx.c | 171 ++++ arch/arm/cpu/arm926ejs/spear/spl-spear600.c | 98 ++ arch/arm/cpu/arm926ejs/spear/spl.c | 181 +--- arch/arm/cpu/arm926ejs/spear/spl_boot.c | 206 +++- arch/arm/cpu/arm926ejs/spear/spl_nand.c | 121 +++ arch/arm/cpu/arm926ejs/spear/start.S | 58 +- arch/arm/cpu/arm926ejs/spear/timer.c | 8 +- arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds | 65 +- arch/arm/cpu/armv7/Makefile | 17 +- arch/arm/cpu/armv7/ca9_ltimer.c | 154 +++ arch/arm/cpu/armv7/spear13xx/Makefile | 71 ++ arch/arm/cpu/armv7/spear13xx/reset.c | 47 + arch/arm/cpu/armv7/spear13xx/spear1310-pinmux.c | 860 ++++++++++++++++ arch/arm/cpu/armv7/spear13xx/spear1310.c | 205 ++++ arch/arm/cpu/armv7/spear13xx/spear1340-pinmux.c | 439 ++++++++ arch/arm/cpu/armv7/spear13xx/spear1340.c | 270 +++++ arch/arm/cpu/armv7/spear13xx/spear13xx.c | 62 ++ arch/arm/cpu/armv7/spear13xx/spl-boot.c | 76 ++ arch/arm/cpu/armv7/spear13xx/spl-lvl_gatetrn.c | 239 +++++ arch/arm/cpu/armv7/spear13xx/spl-lvl_read.c | 229 +++++ arch/arm/cpu/armv7/spear13xx/spl-lvl_write.c | 608 +++++++++++ arch/arm/cpu/armv7/spear13xx/spl-spear1310.c | 230 +++++ arch/arm/cpu/armv7/spear13xx/spl-spear1340.c | 210 ++++ arch/arm/cpu/armv7/spear13xx/spl-spear13xx.c | 162 +++ arch/arm/cpu/armv7/spear13xx/spl-swlvl.c | 93 ++ arch/arm/cpu/armv7/spear13xx/start.S | 137 +++ arch/arm/cpu/armv7/spear13xx/u-boot-spl.lds | 45 + arch/arm/cpu/armv7/spear13xx/wakeup.S | 60 ++ arch/arm/include/asm/arch-spear/bootrom_table.h | 54 + arch/arm/include/asm/arch-spear/clk.h | 5 + .../include/asm/arch-spear/{spr_emi.h => emi.h} | 8 +- arch/arm/include/asm/arch-spear/generic.h | 123 +++ .../include/asm/arch-spear/{spr_gpt.h => gpt.h} | 4 +- arch/arm/include/asm/arch-spear/hardware.h | 78 +- .../include/asm/arch-spear/{spr_misc.h => misc.h} | 208 ++-- .../include/asm/arch-spear/{spr_ssp.h => mmc.h} | 26 +- arch/arm/include/asm/arch-spear/pinmux.h | 133 +++ arch/arm/include/asm/arch-spear/spear300.h | 83 ++ arch/arm/include/asm/arch-spear/spear310.h | 75 ++ arch/arm/include/asm/arch-spear/spear320.h | 490 +++++++++ arch/arm/include/asm/arch-spear/spear3xx.h | 64 ++ arch/arm/include/asm/arch-spear/spear600.h | 58 ++ arch/arm/include/asm/arch-spear/spl_nand.h | 181 ++++ arch/arm/include/asm/arch-spear/spl_pnor.h | 34 + arch/arm/include/asm/arch-spear/spr_defs.h | 69 -- .../asm/arch-spear/{spr_syscntl.h => syscntl.h} | 21 +- arch/arm/include/asm/arch-spear13xx/boot.h | 106 ++ arch/arm/include/asm/arch-spear13xx/c3.h | 63 ++ arch/arm/include/asm/arch-spear13xx/generic.h | 41 + arch/arm/include/asm/arch-spear13xx/gpio.h | 42 + arch/arm/include/asm/arch-spear13xx/hardware.h | 33 + arch/arm/include/asm/arch-spear13xx/misc.h | 34 + arch/arm/include/asm/arch-spear13xx/mmc.h | 29 + arch/arm/include/asm/arch-spear13xx/mpmc.h | 332 ++++++ arch/arm/include/asm/arch-spear13xx/pinmux.h | 114 +++ arch/arm/include/asm/arch-spear13xx/spear1310.h | 244 +++++ .../include/asm/arch-spear13xx/spear1310_misc.h | 358 +++++++ arch/arm/include/asm/arch-spear13xx/spear1340.h | 159 +++ .../include/asm/arch-spear13xx/spear1340_misc.h | 357 +++++++ arch/arm/include/asm/arch-spear13xx/spear13xx.h | 50 + arch/arm/include/asm/ca9_ltimer.h | 40 + arch/arm/lib/board.c | 12 + board/spear/common/Makefile | 50 - board/spear/spear310/Makefile | 45 - board/{spear/spear600 => st/spear}/Makefile | 17 +- board/st/spear/config.mk | 27 + board/{spear/spear320 => st/spear/ddr}/Makefile | 23 +- .../ddr/spear600_mt47h128m8_3_266_cl5_async.c | 3 +- .../spear/ddr/spear600_mt47h32m16_333_cl5_psync.c | 8 +- .../ddr/spear600_mt47h32m16_37e_166_cl4_sync.c | 3 +- .../ddr/spear600_mt47h64m16_3_333_cl5_psync.c | 8 +- board/st/spear/ddr/spr3xx_mt46h32m16_6_166_cl3.c | 140 +++ .../spear/ddr/spr3xx_mt47h64m16_3_166_cl4_async.c | 146 +++ .../spear/ddr/spr3xx_mt47h64m16_3_266_cl5_async.c | 146 +++ .../spear/ddr/spr3xx_mt47h64m16_3_333_cl5_async.c | 152 +++ .../spear320/spear320.c => st/spear/spear300evb.c} | 56 +- .../spear310/spear310.c => st/spear/spear310evb.c} | 57 +- .../spear300/spear300.c => st/spear/spear320hmi.c} | 66 +- board/st/spear/spear320plc.c | 144 +++ board/st/spear/spear600evb.c | 179 ++++ .../common/spr_misc.c => st/spear/spear_common.c} | 175 +--- .../spear/spear_lowlevel_init.S} | 14 - board/{spear/x600 => st/spear}/x600.c | 0 board/{spear/x600/fpga.c => st/spear/x600fpga.c} | 0 board/{spear/x600/fpga.h => st/spear/x600fpga.h} | 0 board/{spear/x600 => st/spear13xx}/Makefile | 16 +- board/st/spear13xx/config.mk | 27 + .../{spear/spear300 => st/spear13xx/ddr}/Makefile | 25 +- board/st/spear13xx/ddr/h5tq2g63bfr_pbc_400_cl6.c | 238 +++++ board/st/spear13xx/ddr/h5tq2g63bfr_pbc_533_cl8.c | 238 +++++ board/st/spear13xx/ddr/k4b2g1646c_k0_400_cl6.c | 238 +++++ board/st/spear13xx/ddr/k4b2g1646c_k0_533_cl8.c | 238 +++++ .../ddr/mt41j128m16_15e_400_cl6_dqs_dq_term_en.c | 238 +++++ .../ddr/mt41j256m8187e_400_cl6_dqs_dq_term_en.c | 246 +++++ .../ddr/mt41j256m8187e_533_cl7_dqs_dq_term_en.c | 246 +++++ .../ddr/mt41j64m16_15e_400_cl6_dqs_dq_term_en.c | 238 +++++ .../ddr/mt41j64m16_15e_533_cl7_dqs_dq_term_en.c | 238 +++++ .../spear13xx/ddr/mt47h128m16rt187e_400_cl6_ddr2.c | 239 +++++ .../spear13xx/ddr/mt47h128m16rt187e_533_cl7_ddr2.c | 239 +++++ board/st/spear13xx/spear1310evb.c | 93 ++ board/st/spear13xx/spear1340evb.c | 94 ++ .../spear600.c => st/spear13xx/spear1340lcad.c} | 60 +- board/st/spear13xx/spear13xx_common.c | 53 + board/st/spear13xx/spl-spear1310evb.c | 50 + board/st/spear13xx/spl-spear1340evb.c | 57 ++ boards.cfg | 45 +- common/cmd_bootm.c | 98 ++ common/usb_hub.c | 27 +- drivers/misc/Makefile | 1 + drivers/misc/c3.c | 122 +++ drivers/mmc/Makefile | 1 + drivers/mmc/spear_sdhci.c | 44 + drivers/mtd/st_smi.c | 73 +- drivers/net/designware.c | 4 +- drivers/net/macb.c | 48 +- drivers/serial/usbtty.c | 2 +- drivers/serial/usbtty.h | 2 + drivers/spi/Makefile | 1 + drivers/spi/pl022_spi.c | 308 ++++++ drivers/usb/gadget/Makefile | 1 + drivers/usb/gadget/designware_otg.c | 1063 ++++++++++++++++++++ drivers/usb/host/Makefile | 1 + drivers/usb/host/ehci-spear.c | 70 ++ include/configs/spear-common.h | 251 ----- include/configs/spear.h | 242 +++++ include/configs/spear1310-evb.h | 118 +++ include/configs/spear1310.h | 35 + include/configs/spear1340-evb.h | 124 +++ include/configs/spear1340-lcad.h | 91 ++ include/configs/spear1340.h | 30 + include/configs/spear13xx.h | 121 +++ include/configs/spear300-evb.h | 114 +++ include/configs/{spear6xx_evb.h => spear300.h} | 45 +- include/configs/spear310-evb.h | 145 +++ include/configs/spear310.h | 76 ++ include/configs/spear320-evb.h | 109 ++ include/configs/spear320-hmi.h | 117 +++ include/configs/spear320.h | 66 ++ include/configs/spear3xx.h | 65 ++ include/configs/spear3xx_evb.h | 173 ---- include/configs/spear600-evb.h | 119 +++ include/configs/spear600.h | 69 ++ include/configs/x600.h | 2 +- include/linux/bitops.h | 12 + include/linux/mtd/st_smi.h | 1 - include/usb/designware_otg.h | 500 +++++++++ include/usbdevice.h | 4 +- spl/Makefile | 11 + 162 files changed, 18111 insertions(+), 1684 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/cache.c create mode 100644 arch/arm/cpu/arm926ejs/spear/emi.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear300.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear310.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear320.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear3xx.c delete mode 100644 arch/arm/cpu/arm926ejs/spear/spear600.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spear6xx.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spl-spear3xx.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spl-spear600.c create mode 100644 arch/arm/cpu/arm926ejs/spear/spl_nand.c create mode 100644 arch/arm/cpu/armv7/ca9_ltimer.c create mode 100644 arch/arm/cpu/armv7/spear13xx/Makefile create mode 100644 arch/arm/cpu/armv7/spear13xx/reset.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1310-pinmux.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1310.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1340-pinmux.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear1340.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spear13xx.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-boot.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-lvl_gatetrn.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-lvl_read.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-lvl_write.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-spear1310.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-spear1340.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-spear13xx.c create mode 100644 arch/arm/cpu/armv7/spear13xx/spl-swlvl.c create mode 100644 arch/arm/cpu/armv7/spear13xx/start.S create mode 100644 arch/arm/cpu/armv7/spear13xx/u-boot-spl.lds create mode 100644 arch/arm/cpu/armv7/spear13xx/wakeup.S create mode 100644 arch/arm/include/asm/arch-spear/bootrom_table.h rename arch/arm/include/asm/arch-spear/{spr_emi.h => emi.h} (94%) create mode 100644 arch/arm/include/asm/arch-spear/generic.h rename arch/arm/include/asm/arch-spear/{spr_gpt.h => gpt.h} (97%) rename arch/arm/include/asm/arch-spear/{spr_misc.h => misc.h} (52%) rename arch/arm/include/asm/arch-spear/{spr_ssp.h => mmc.h} (69%) create mode 100644 arch/arm/include/asm/arch-spear/pinmux.h create mode 100644 arch/arm/include/asm/arch-spear/spear300.h create mode 100644 arch/arm/include/asm/arch-spear/spear310.h create mode 100644 arch/arm/include/asm/arch-spear/spear320.h create mode 100644 arch/arm/include/asm/arch-spear/spear3xx.h create mode 100644 arch/arm/include/asm/arch-spear/spear600.h create mode 100644 arch/arm/include/asm/arch-spear/spl_nand.h create mode 100644 arch/arm/include/asm/arch-spear/spl_pnor.h delete mode 100644 arch/arm/include/asm/arch-spear/spr_defs.h rename arch/arm/include/asm/arch-spear/{spr_syscntl.h => syscntl.h} (71%) create mode 100644 arch/arm/include/asm/arch-spear13xx/boot.h create mode 100644 arch/arm/include/asm/arch-spear13xx/c3.h create mode 100644 arch/arm/include/asm/arch-spear13xx/generic.h create mode 100644 arch/arm/include/asm/arch-spear13xx/gpio.h create mode 100644 arch/arm/include/asm/arch-spear13xx/hardware.h create mode 100644 arch/arm/include/asm/arch-spear13xx/misc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/mmc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/mpmc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/pinmux.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1310.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1310_misc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1340.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear1340_misc.h create mode 100644 arch/arm/include/asm/arch-spear13xx/spear13xx.h create mode 100644 arch/arm/include/asm/ca9_ltimer.h delete mode 100644 board/spear/common/Makefile delete mode 100644 board/spear/spear310/Makefile rename board/{spear/spear600 => st/spear}/Makefile (74%) create mode 100644 board/st/spear/config.mk rename board/{spear/spear320 => st/spear/ddr}/Makefile (63%) rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h128m8_3_266_cl5_async.c => board/st/spear/ddr/spear600_mt47h128m8_3_266_cl5_async.c (95%) rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_333_cl5_psync.c => board/st/spear/ddr/spear600_mt47h32m16_333_cl5_psync.c (91%) rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h32m16_37e_166_cl4_sync.c => board/st/spear/ddr/spear600_mt47h32m16_37e_166_cl4_sync.c (95%) rename arch/arm/cpu/arm926ejs/spear/spr600_mt47h64m16_3_333_cl5_psync.c => board/st/spear/ddr/spear600_mt47h64m16_3_333_cl5_psync.c (91%) create mode 100644 board/st/spear/ddr/spr3xx_mt46h32m16_6_166_cl3.c create mode 100644 board/st/spear/ddr/spr3xx_mt47h64m16_3_166_cl4_async.c create mode 100644 board/st/spear/ddr/spr3xx_mt47h64m16_3_266_cl5_async.c create mode 100644 board/st/spear/ddr/spr3xx_mt47h64m16_3_333_cl5_async.c rename board/{spear/spear320/spear320.c => st/spear/spear300evb.c} (69%) rename board/{spear/spear310/spear310.c => st/spear/spear310evb.c} (68%) rename board/{spear/spear300/spear300.c => st/spear/spear320hmi.c} (58%)create mode 100644
board/st/spear/spear320plc.c
create mode 100644board/st/spear/spear600evb.c
renameboard/{spear/common/spr_misc.c=>st/spear/spear_common.c} (52%) renameboard/{spear/common/spr_lowlevel_init.S=>st/spear/spear_lowlevel_init.S} (88%) rename board/{spear/x600 =>st/spear}/x600.c(100%)
renameboard/{spear/x600/fpga.c=>st/spear/x600fpga.c} (100%)
renameboard/{spear/x600/fpga.h=>st/spear/x600fpga.h} (100%)
rename board/{spear/x600 => st/spear13xx}/Makefile (76%)
create mode 100644board/st/spear13xx/config.mk
rename board/{spear/spear300 => st/spear13xx/ddr}/Makefile (57%)
create mode 100644board/st/spear13xx/ddr/h5tq2g63bfr_pbc_400_cl6.ccreate mode 100644board/st/spear13xx/ddr/h5tq2g63bfr_pbc_533_cl8.ccreate mode 100644board/st/spear13xx/ddr/k4b2g1646c_k0_400_cl6.c
create mode 100644board/st/spear13xx/ddr/k4b2g1646c_k0_533_cl8.c
create mode 100644board/st/spear13xx/ddr/mt41j128m16_15e_400_cl6_dqs_dq_term_en.ccreate mode 100644board/st/spear13xx/ddr/mt41j256m8187e_400_cl6_dqs_dq_term_en.ccreate mode 100644board/st/spear13xx/ddr/mt41j256m8187e_533_cl7_dqs_dq_term_en.ccreate mode 100644board/st/spear13xx/ddr/mt41j64m16_15e_400_cl6_dqs_dq_term_en.ccreate mode 100644board/st/spear13xx/ddr/mt41j64m16_15e_533_cl7_dqs_dq_term_en.ccreate mode 100644board/st/spear13xx/ddr/mt47h128m16rt187e_400_cl6_ddr2.ccreate mode 100644board/st/spear13xx/ddr/mt47h128m16rt187e_533_cl7_ddr2.ccreate mode 100644board/st/spear13xx/spear1310evb.c
create mode 100644board/st/spear13xx/spear1340evb.c
renameboard/{spear/spear600/spear600.c=>st/spear13xx/spear1340lcad.c} (60%) create mode 100644board/st/spear13xx/spear13xx_common.c
create mode 100644board/st/spear13xx/spl-spear1310evb.c
create mode 100644board/st/spear13xx/spl-spear1340evb.c
create mode 100644drivers/misc/c3.c
create mode 100644drivers/mmc/spear_sdhci.c
create mode 100644drivers/spi/pl022_spi.c
create mode 100644drivers/usb/gadget/designware_otg.c
create mode 100644drivers/usb/host/ehci-spear.c
delete mode 100644include/configs/spear-common.h
create mode 100644include/configs/spear.h
create mode 100644include/configs/spear1310-evb.h
create mode 100644include/configs/spear1310.h
create mode 100644include/configs/spear1340-evb.h
create mode 100644include/configs/spear1340-lcad.h
create mode 100644include/configs/spear1340.h
create mode 100644include/configs/spear13xx.h
create mode 100644include/configs/spear300-evb.h
renameinclude/configs/{spear6xx_evb.h=>spear300.h} (54%)
create mode 100644include/configs/spear310-evb.h
create mode 100644include/configs/spear310.h
create mode 100644include/configs/spear320-evb.h
create mode 100644include/configs/spear320-hmi.h
create mode 100644include/configs/spear320.h
create mode 100644include/configs/spear3xx.h
delete mode 100644include/configs/spear3xx_evb.h
create mode 100644include/configs/spear600-evb.h
create mode 100644include/configs/spear600.h
create mode 100644include/usb/designware_otg.h