Support for board Calao USB A9263
Subsystems (4)
cover Support for board Calao USB A9263
Hello,
This patchset implements the support for the Calao USB A9263 board (patch 4). The first three patches are preliminary work, to convert the Atmel Dataflash SPI driver to the new C struct accessors introduced a few months ago for AT91 support in U-Boot.
Thanks,
Thomas
Thomas Petazzoni (4):
Atmel Dataflash: convert to C struct accessors
at91_spi: remove register offsets
at91sam9263: add new style definition for SPI0_BASE Support for Calao USB A9263 board based on AT91SAM9263 CPU
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + arch/arm/include/asm/arch-at91/at91_spi.h | 152 +++++++++------------ arch/arm/include/asm/arch-at91/at91sam9263.h | 1 + board/calao/usb-a9263/Makefile | 58 ++++++++ board/calao/usb-a9263/config.mk | 24 ++++ board/calao/usb-a9263/partition.c | 38 ++++++ board/calao/usb-a9263/usb-a9263.c | 186 ++++++++++++++++++++++++++ drivers/spi/atmel_dataflash_spi.c | 73 ++++++----- include/configs/usb-a9263.h | 182 +++++++++++++++++++++++++ 11 files changed, 598 insertions(+), 124 deletions(-) create mode 100644 board/calao/usb-a9263/Makefile create mode 100644 board/calao/usb-a9263/config.mk create mode 100644 board/calao/usb-a9263/partition.c create mode 100644 board/calao/usb-a9263/usb-a9263.c create mode 100644 include/configs/usb-a9263.h
PATCH 1/4 Atmel Dataflash: convert to C struct accessors
Instead of using the old-style base + offset accessors, use the new at91 C struct accessors.
The removal of #ifdef CONFIG_AT91_LEGACY allows to keep the definition of register values, needed to program the SPI.
--- arch/arm/include/asm/arch-at91/at91_spi.h | 4 -- drivers/spi/atmel_dataflash_spi.c | 73 +++++++++++++++-------------- 2 files changed, 38 insertions(+), 39 deletions(-)
arch/arm/include/asm/arch-at91/at91_spi.h +0 -4
@@ -33,8 +33,6 @@ typedef struct at91_spi {at91_pdc_t pdc; } at91_spi_t; -#ifdef CONFIG_AT91_LEGACY -#define AT91_SPI_CR 0x00/* Control Register */ #define AT91_SPI_SPIEN (1 << 0)/* SPI Enable */ #define AT91_SPI_SPIDIS (1 << 1)/* SPI Disable */
@@ -121,6 +119,4 @@ typedef struct at91_spi {#define AT91_SPI_PTSR 0x0124/* PDC Transfer Status Register */ -#endif /* CONFIG_AT91_LEGACY */ -#endif
drivers/spi/atmel_dataflash_spi.c +38 -35
182 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 2/4 at91_spi: remove register offsets
In reply to Thomas PetazzoniSince all users of at91_spi have been converted to C struct accessors, the register offsets definitions are no longer needed.
We take this opportunity to do a little bit of reformatting for the register bits definitions.
--- arch/arm/include/asm/arch-at91/at91_spi.h | 148 ++++++++++++----------------- 1 files changed, 63 insertions(+), 85 deletions(-)
arch/arm/include/asm/arch-at91/at91_spi.h +63 -85
@@ -33,90 +33,68 @@ typedef struct at91_spi {at91_pdc_t pdc; } at91_spi_t; -#define AT91_SPI_CR 0x00/* Control Register */ -#define AT91_SPI_SPIEN (1 << 0)/* SPI Enable */ -#define AT91_SPI_SPIDIS (1 << 1)/* SPI Disable */ -#define AT91_SPI_SWRST (1 << 7)/* SPI Software Reset */ -#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ - -#define AT91_SPI_MR 0x04/* Mode Register */ -#define AT91_SPI_MSTR (1 << 0)/* Master/Slave Mode */ -#define AT91_SPI_PS (1 << 1)/* Peripheral Select */ -#define AT91_SPI_PS_FIXED (0 << 1) -#define AT91_SPI_PS_VARIABLE (1 << 1) -#define AT91_SPI_PCSDEC (1 << 2)/* Chip Select Decode */ -#define AT91_SPI_DIV32 (1 << 3)/* Clock Selection [AT91RM9200 only] */ -#define AT91_SPI_MODFDIS (1 << 4)/* Mode Fault Detection */ -#define AT91_SPI_LLB (1 << 7)/* Local Loopback Enable */ -#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ -#define AT91_SPI_DLYBCS (0xff << 24)/* Delay Between Chip Selects */ - -#define AT91_SPI_RDR 0x08/* Receive Data Register */ -#define AT91_SPI_RD (0xffff << 0)/* Receive Data */ -#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ - -#define AT91_SPI_TDR 0x0c/* Transmit Data Register */ -#define AT91_SPI_TD (0xffff << 0)/* Transmit Data */ -#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ -#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ - -#define AT91_SPI_SR 0x10/* Status Register */ -#define AT91_SPI_RDRF (1 << 0)/* Receive Data Register Full */ -#define AT91_SPI_TDRE (1 << 1)/* Transmit Data Register Full */ -#define AT91_SPI_MODF (1 << 2)/* Mode Fault Error */ -#define AT91_SPI_OVRES (1 << 3)/* Overrun Error Status */ -#define AT91_SPI_ENDRX (1 << 4)/* End of RX buffer */ -#define AT91_SPI_ENDTX (1 << 5)/* End of TX buffer */ -#define AT91_SPI_RXBUFF (1 << 6)/* RX Buffer Full */ -#define AT91_SPI_TXBUFE (1 << 7)/* TX Buffer Empty */ -#define AT91_SPI_NSSR (1 << 8)/* NSS Rising [SAM9261 only] */ -#define AT91_SPI_TXEMPTY (1 << 9)/* Transmission Register Empty [SAM9261 only] */ -#define AT91_SPI_SPIENS (1 << 16)/* SPI Enable Status */ - -#define AT91_SPI_IER 0x14/* Interrupt Enable Register */ -#define AT91_SPI_IDR 0x18/* Interrupt Disable Register */ -#define AT91_SPI_IMR 0x1c/* Interrupt Mask Register */ - -#define AT91_SPI_CSR (n) (0x30 + ((n) * 4))/* Chip Select Registers 0-3 */ -#define AT91_SPI_CPOL (1 << 0)/* Clock Polarity */ -#define AT91_SPI_NCPHA (1 << 1)/* Clock Phase */ -#define AT91_SPI_CSAAT (1 << 3)/* Chip Select Active After Transfer [SAM9261 only] */ -#define AT91_SPI_BITS (0xf << 4)/* Bits Per Transfer */ -#define AT91_SPI_BITS_8 (0 << 4) -#define AT91_SPI_BITS_9 (1 << 4) -#define AT91_SPI_BITS_10 (2 << 4) -#define AT91_SPI_BITS_11 (3 << 4) -#define AT91_SPI_BITS_12 (4 << 4) -#define AT91_SPI_BITS_13 (5 << 4) -#define AT91_SPI_BITS_14 (6 << 4) -#define AT91_SPI_BITS_15 (7 << 4) -#define AT91_SPI_BITS_16 (8 << 4) -#define AT91_SPI_SCBR (0xff << 8)/* Serial Clock Baud Rate */ -#define AT91_SPI_DLYBS (0xff << 16)/* Delay before SPCK */ -#define AT91_SPI_DLYBCT (0xff << 24)/* Delay between Consecutive Transfers */ - -#define AT91_SPI_RPR 0x0100/* Receive Pointer Register */ - -#define AT91_SPI_RCR 0x0104/* Receive Counter Register */ - -#define AT91_SPI_TPR 0x0108/* Transmit Pointer Register */ - -#define AT91_SPI_TCR 0x010c/* Transmit Counter Register */ - -#define AT91_SPI_RNPR 0x0110/* Receive Next Pointer Register */ - -#define AT91_SPI_RNCR 0x0114/* Receive Next Counter Register */ - -#define AT91_SPI_TNPR 0x0118/* Transmit Next Pointer Register */ - -#define AT91_SPI_TNCR 0x011c/* Transmit Next Counter Register */ - -#define AT91_SPI_PTCR 0x0120/* PDC Transfer Control Register */ -#define AT91_SPI_RXTEN (0x1 << 0)/* Receiver Transfer Enable */ -#define AT91_SPI_RXTDIS (0x1 << 1)/* Receiver Transfer Disable */ -#define AT91_SPI_TXTEN (0x1 << 8)/* Transmitter Transfer Enable */ -#define AT91_SPI_TXTDIS (0x1 << 9)/* Transmitter Transfer Disable */ - -#define AT91_SPI_PTSR 0x0124/* PDC Transfer Status Register */ +/* Control Register bits */ +#define AT91_SPI_SPIEN (1 << 0)/* SPI Enable */ +#define AT91_SPI_SPIDIS (1 << 1)/* SPI Disable */ +#define AT91_SPI_SWRST (1 << 7)/* SPI Software Reset */ +#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ + +/* Mode Register bits */ +#define AT91_SPI_MSTR (1 << 0)/* Master/Slave Mode */ +#define AT91_SPI_PS (1 << 1)/* Peripheral Select */ +#define AT91_SPI_PS_FIXED (0 << 1) +#define AT91_SPI_PS_VARIABLE (1 << 1) +#define AT91_SPI_PCSDEC (1 << 2)/* Chip Select Decode */ +#define AT91_SPI_DIV32 (1 << 3)/* Clock Selection [AT91RM9200 only] */ +#define AT91_SPI_MODFDIS (1 << 4)/* Mode Fault Detection */ +#define AT91_SPI_LLB (1 << 7)/* Local Loopback Enable */ +#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ +#define AT91_SPI_DLYBCS (0xff << 24)/* Delay Between Chip Selects */ + +/* Receive data register bits */ +#define AT91_SPI_RD (0xffff << 0)/* Receive Data */ +#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ + +/* Transmit Data Register bits */ +#define AT91_SPI_TD (0xffff << 0)/* Transmit Data */ +#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ +#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ + +/* Status Register bits */ +#define AT91_SPI_RDRF (1 << 0)/* Receive Data Register Full */ +#define AT91_SPI_TDRE (1 << 1)/* Transmit Data Register Full */ +#define AT91_SPI_MODF (1 << 2)/* Mode Fault Error */ +#define AT91_SPI_OVRES (1 << 3)/* Overrun Error Status */ +#define AT91_SPI_ENDRX (1 << 4)/* End of RX buffer */ +#define AT91_SPI_ENDTX (1 << 5)/* End of TX buffer */ +#define AT91_SPI_RXBUFF (1 << 6)/* RX Buffer Full */ +#define AT91_SPI_TXBUFE (1 << 7)/* TX Buffer Empty */ +#define AT91_SPI_NSSR (1 << 8)/* NSS Rising [SAM9261 only] */ +#define AT91_SPI_TXEMPTY (1 << 9)/* Transmission Register Empty [SAM9261 only] */ +#define AT91_SPI_SPIENS (1 << 16)/* SPI Enable Status */ + +/* Chip Select Registers bits */ +#define AT91_SPI_CPOL (1 << 0)/* Clock Polarity */ +#define AT91_SPI_NCPHA (1 << 1)/* Clock Phase */ +#define AT91_SPI_CSAAT (1 << 3)/* Chip Select Active After Transfer [SAM9261 only] */ +#define AT91_SPI_BITS (0xf << 4)/* Bits Per Transfer */ +#define AT91_SPI_BITS_8 (0 << 4) +#define AT91_SPI_BITS_9 (1 << 4) +#define AT91_SPI_BITS_10 (2 << 4) +#define AT91_SPI_BITS_11 (3 << 4) +#define AT91_SPI_BITS_12 (4 << 4) +#define AT91_SPI_BITS_13 (5 << 4) +#define AT91_SPI_BITS_14 (6 << 4) +#define AT91_SPI_BITS_15 (7 << 4) +#define AT91_SPI_BITS_16 (8 << 4) +#define AT91_SPI_SCBR (0xff << 8)/* Serial Clock Baud Rate */ +#define AT91_SPI_DLYBS (0xff << 16)/* Delay before SPCK */ +#define AT91_SPI_DLYBCT (0xff << 24)/* Delay between Consecutive Transfers */ + +/* PDC Transfer Control Register bits */ +#define AT91_SPI_RXTEN (0x1 << 0)/* Receiver Transfer Enable */ +#define AT91_SPI_RXTDIS (0x1 << 1)/* Receiver Transfer Disable */ +#define AT91_SPI_TXTEN (0x1 << 8)/* Transmitter Transfer Enable */ +#define AT91_SPI_TXTDIS (0x1 << 9)/* Transmitter Transfer Disable */ #endif
Signature · 1 line
1.7.0.4
PATCH 3/4 at91sam9263: add new style definition for SPI0_BASE
In reply to Thomas PetazzoniThe new C struct accessors define new constants for the base address of the peripherals. Let's add the one needed for SPI0 on AT91SAM9263.
--- arch/arm/include/asm/arch-at91/at91sam9263.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-at91/at91sam9263.h +1 -0
@@ -47,6 +47,7 @@#define AT91SAM9263_ID_IRQ0 30/* Advanced Interrupt Controller (IRQ0) */ #define AT91SAM9263_ID_IRQ1 31/* Advanced Interrupt Controller (IRQ1) */ +#define AT91_SPI0_BASE 0xfffa4000#define AT91_EMAC_BASE 0xfffbc000#define AT91_ECC0_BASE 0xffffe000#define AT91_SDRAMC0_BASE 0xffffe200
Signature · 1 line
1.7.0.4
PATCH 4/4 Support for Calao USB A9263 board based on AT91SAM9263 CPU
In reply to Thomas PetazzoniThe Calao USB A9263 board is a board manufactured and sold by Calao Systems <http://www.calao-systems.com>. Its components are very similar to the AT91SAM9263EK board, so its configuration is based on the configuration of this board. There are however some
differences: different clocks, no LCD, etc.
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/calao/usb-a9263/Makefile | 58 ++++++++++++ board/calao/usb-a9263/config.mk | 24 +++++ board/calao/usb-a9263/partition.c | 38 ++++++++ board/calao/usb-a9263/usb-a9263.c | 186 +++++++++++++++++++++++++++++++++++++ include/configs/usb-a9263.h | 182 ++++++++++++++++++++++++++++++++++++ 8 files changed, 496 insertions(+), 0 deletions(-) create mode 100644 board/calao/usb-a9263/Makefile create mode 100644 board/calao/usb-a9263/config.mk create mode 100644 board/calao/usb-a9263/partition.c create mode 100644 board/calao/usb-a9263/usb-a9263.c create mode 100644 include/configs/usb-a9263.h
MAINTAINERS +4 -0
@@ -700,6 +700,10 @@ Peter Pearse <[email protected]> versatile ARM926EJ-S versatile ARM926EJ-S +Thomas Petazzoni <[email protected]> + + usb-a9263 ARM926EJS (AT91SAM9263 SoC) + Dave Peverley <[email protected]> omap730p2 ARM926EJS
MAKEALL +1 -0
@@ -685,6 +685,7 @@ LIST_at91=" \ SBC35_A9G20 \ TNY_A9260 \ TNY_A9G20 \ + usb9263 \ " #########################################################################
Makefile +3 -0
@@ -2890,6 +2890,9 @@ TNY_A9260_config : unconfig @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h @$(MKCONFIG) -a tny_a9260 arm arm926ejs tny_a9260 calao at91 +usb_a9263_config : unconfig + $(MKCONFIG) -a usb-a9263 arm arm926ejs usb-a9263 calao at91 + ######################################################################## ## ARM Integrator boards - see doc/README-integrator for more info. integratorap_config \
board/calao/usb-a9263/Makefile new file +58 -0
58 lines not on this page · raw message
board/calao/usb-a9263/config.mk new file +24 -0
@@ -0,0 +1,24 @@ +# +# (C) Copyright 2009 +# Thomas Petazzoni, Free Electrons, <[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 +# + +TEXT_BASE = 0x23f00000
board/calao/usb-a9263/partition.c new file +38 -0
@@ -0,0 +1,38 @@ +/* +* (C) Copyright 2008-2009 +* Ulf Samuelsson <[email protected]> +* Thomas Petazzoni, Free Electrons, <[email protected]> +* +* 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> +#include <config.h> +#include <asm/hardware.h> +#include <dataflash.h> + +AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS ]; + +struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS ] = { + {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 ,0 },/* Logical adress, CS */ +}; + +/*define the area offsets*/ +dataflash_protect_t area_list[NB_DATAFLASH_AREA ] = { + {0x00000000 ,0x00001FFF ,FLAG_PROTECT_SET ,0 ,"Bootstrap" }, + {0x00002000 ,0x00003FFF ,FLAG_PROTECT_CLEAR ,0 ,"Environment" }, + {0x00004000 ,0xFFFFFFFF ,FLAG_PROTECT_SET ,0 ,"U-Boot" }, +};
board/calao/usb-a9263/usb-a9263.c new file +186 -0
186 lines not on this page · raw message
include/configs/usb-a9263.h new file +182 -0
182 lines not on this page · raw message
Signature · 1 line
1.7.0.4
cover Support for board Calao USB A9263
In reply to Thomas PetazzoniQuoted 8 lines · Thomas Petazzoni
Hello,
This patchset implements the support for the Calao USB A9263 board (patch 4). The first three patches are preliminary work, to convert the Atmel Dataflash SPI driver to the new C struct accessors introduced a few months ago for AT91 support in U-Boot.
Thanks,
This is only a mechanical review.
I tested this patch using MAKEALL arm
and by running the kernel's checkpatch.pl against these patches
There are many at91 errors
Here is a sample, about 10 boards are broken in the same way.
atmel_dataflash_spi.c: In function 'AT91F_SpiInit':
atmel_dataflash_spi.c:42: error: 'AT91_SPI0_BASE' undeclared (first use in this
function)
atmel_dataflash_spi.c:42: error: (Each undeclared identifier is reported only once atmel_dataflash_spi.c:42: error: for each function it appears in.) atmel_dataflash_spi.c: In function 'AT91F_SpiEnable':
atmel_dataflash_spi.c:100: error: 'AT91_SPI0_BASE' undeclared (first use in
this function)
atmel_dataflash_spi.c: In function 'AT91F_SpiWrite':
atmel_dataflash_spi.c:138: error: 'AT91_SPI0_BASE' undeclared (first use in
this function)
make[1]: *** [.../build/drivers/spi/atmel_dataflash_spi.o] Error 1 make: *** [.../build/drivers/spi/libspi.a] Error 2 make: *** Waiting for unfinished jobs....
usb9263 does not build
usb9263.ERR
did not build.
Many kernel check patch errors and warnings.
Please resolve these and resubmit.
Tom
cover Calao USB-A9263 v2
Hello,
Here is a resend of the Calao USB-A9263 board support, with the following changes since v1:
* checkpatch fixes all over the place. There is a remaining "Macros with complex values should be enclosed in parenthesis" checkpatch issue, but this is unfortunately how this macro should be used (it's the new AT91 accessors)
* build fixes for all AT91 boards. "MAKEALL at91" builds all boards sucessfully. There are only one warning per board saying that atmel_usart should be converted to C struct accessors. I intend to work on this when the current patches get merged.
Thanks,
Thomas
Thomas Petazzoni (4):
Atmel Dataflash: convert to C struct accessors
at91_spi: remove register offsets
Add new style definition for SPI0_BASE
Support for Calao USB A9263 board based on AT91SAM9263 CPU
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + arch/arm/include/asm/arch-at91/at91_spi.h | 157 ++++++++++------------ arch/arm/include/asm/arch-at91/at91cap9.h | 1 + arch/arm/include/asm/arch-at91/at91sam9260.h | 1 + arch/arm/include/asm/arch-at91/at91sam9261.h | 1 + arch/arm/include/asm/arch-at91/at91sam9263.h | 1 + arch/arm/include/asm/arch-at91/at91sam9g45.h | 1 + arch/arm/include/asm/arch-at91/at91sam9rl.h | 1 + board/calao/usb-a9263/Makefile | 58 ++++++++ board/calao/usb-a9263/config.mk | 24 ++++ board/calao/usb-a9263/partition.c | 38 ++++++ board/calao/usb-a9263/usb-a9263.c | 186 ++++++++++++++++++++++++++ drivers/spi/atmel_dataflash_spi.c | 77 ++++++----- include/configs/usb-a9263.h | 182 +++++++++++++++++++++++++ 16 files changed, 611 insertions(+), 125 deletions(-) create mode 100644 board/calao/usb-a9263/Makefile create mode 100644 board/calao/usb-a9263/config.mk create mode 100644 board/calao/usb-a9263/partition.c create mode 100644 board/calao/usb-a9263/usb-a9263.c create mode 100644 include/configs/usb-a9263.h
PATCH 1/4 Atmel Dataflash: convert to C struct accessors
In reply to Tom RixInstead of using the old-style base + offset accessors, use the new at91 C struct accessors.
The removal of #ifdef CONFIG_AT91_LEGACY allows to keep the definition of register values, needed to program the SPI.
--- arch/arm/include/asm/arch-at91/at91_spi.h | 4 -- drivers/spi/atmel_dataflash_spi.c | 77 +++++++++++++++------------- 2 files changed, 41 insertions(+), 40 deletions(-)
arch/arm/include/asm/arch-at91/at91_spi.h +0 -4
@@ -33,8 +33,6 @@ typedef struct at91_spi {at91_pdc_t pdc; } at91_spi_t; -#ifdef CONFIG_AT91_LEGACY -#define AT91_SPI_CR 0x00/* Control Register */ #define AT91_SPI_SPIEN (1 << 0)/* SPI Enable */ #define AT91_SPI_SPIDIS (1 << 1)/* SPI Disable */
@@ -121,6 +119,4 @@ typedef struct at91_spi {#define AT91_SPI_PTSR 0x0124/* PDC Transfer Status Register */ -#endif /* CONFIG_AT91_LEGACY */ -#endif
drivers/spi/atmel_dataflash_spi.c +41 -36
185 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 1/4 Atmel Dataflash: convert to C struct accessors
Quoted 5 lines · On Monday, June 07, 2010 17:56:21 Thomas Petazzoni wrote:
Instead of using the old-style base + offset accessors, use the new at91 C struct accessors.
The removal of #ifdef
CONFIG_AT91_LEGACYallows to keep the definition of register values, needed to program the SPI.
i have to ask ... what exactly is the advantage of the dataflash driver over the common spi flash drivers ? ive looked a bit and cant pick anything out. better to just scuttle the entire code base imo and unify consumers.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100607/238b752f/attachment.pgp
PATCH 1/4 Atmel Dataflash: convert to C struct accessors
Quoted 4 lines · On Mon, 7 Jun 2010 18:52:03 -0400 Mike Frysinger <[email protected]> wrote:
i have to ask ... what exactly is the advantage of the dataflash driver over the common spi flash drivers ? ive looked a bit and cant pick anything out. better to just scuttle the entire code base imo and unify consumers.
I don't know the history of both drivers, but indeed it seems that the AT91-custom dataflash driver should be replaced by the corresponding SPI flash driver. I'll dig into this and see what I can do.
However, I only have a Calao USB-A9263 board and an Atmel AT91SAM9261EK board here, so I won't be able to test on all Atmel evaluation boards.
Thomas
Signature · 11 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20100608/2ecbc8fd/attachment.pgp
PATCH 1/4 Atmel Dataflash: convert to C struct accessors
Quoted 9 lines · On Tuesday, June 08, 2010 08:24:33 Thomas Petazzoni wrote:
Quoted 4 lines · On Mon, 7 Jun 2010 18:52:03 -0400 Mike Frysinger wrote:
i have to ask ... what exactly is the advantage of the dataflash driver over the common spi flash drivers ? ive looked a bit and cant pick anything out. better to just scuttle the entire code base imo and unify consumers.
I don't know the history of both drivers, but indeed it seems that the AT91-custom dataflash driver should be replaced by the corresponding SPI flash driver. I'll dig into this and see what I can do.
speaking historically, the dataflash code absolutely has its place. it existed long before the SPI flash framework. but i'm looking forward only now.
Quoted 2 lines
However, I only have a Calao USB-A9263 board and an Atmel AT91SAM9261EK board here, so I won't be able to test on all Atmel evaluation boards.
i think the first step would be to convert the boards we can and leave a #warning for the rest that the dataflash code is being killed off. then after some time, if no one has fixed the remainders, we do our best to convert them. -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100608/0bfe4d18/attachment.pgp
PATCH 1/4 Atmel Dataflash: convert to C struct accessors
Quoted 3 lines · On Tue, 8 Jun 2010 15:20:57 -0400 Mike Frysinger <[email protected]> wrote:
speaking historically, the dataflash code absolutely has its place. it existed long before the SPI flash framework. but i'm looking forward only now.
Yes, of course, understood.
However, the Dataflash aren't normal SPI flash, they don't have the same opcodes. For example, drivers/mtd/spi/spi_flash.c assumes that it can probe the "ID code" of the SPI flash by sending the CMD_READ_ID (0x9F) command (in spi_flash_probe()). This works for SPI flashes, but not for Dataflashes. The identification of Dataflashes takes place with command GET_STATUS (0xD7) in drivers/mtd/at45.c, which has a different return value than the 0x9F command of SPI flashes. Am I missing something ?
In terms of code infrastructure/organization, how do you suggest to handle this ?
Quoted 4 lines
i think the first step would be to convert the boards we can and leave a #warning for the rest that the dataflash code is being killed off. then after some time, if no one has fixed the remainders, we do our best to convert them. -mike
Ok.
Thomas
Signature · 11 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20100609/7503683b/attachment.pgp
PATCH 1/4 Atmel Dataflash: convert to C struct accessors
Quoted 7 lines · On Wednesday, June 09, 2010 03:06:26 Thomas Petazzoni wrote:
Quoted 3 lines · On Tue, 8 Jun 2010 15:20:57 -0400 Mike Frysinger wrote:
speaking historically, the dataflash code absolutely has its place. it existed long before the SPI flash framework. but i'm looking forward only now.
Yes, of course, understood.
Quoted 8 lines
However, the Dataflash aren't normal SPI flash, they don't have the same opcodes. For example,
drivers/mtd/spi/spi_flash.cassumes that it can probe the "ID code" of the SPI flash by sending theCMD_READ_ID(0x9F) command (inspi_flash_probe()). This works for SPI flashes, but not for Dataflashes. The identification of Dataflashes takes place with commandGET_STATUS(0xD7) indrivers/mtd/at45.c, which has a different return value than the0x9Fcommand of SPI flashes. Am I missing something ?
i see drivers/mtd/spi/atmel.c with all the same IDs as drivers/mtd/dataflash.c so presumably it works. i also vaguely recall having tested one or two myself with the SPI flash subsystem.
according to the datasheet for the AT45DB642D, 0x9F is the "get the ID code" while 0xDF is the "get flash status". i dont see how you can get the flash id info out of the flash status register. perhaps you're confusing the code bases ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100609/9b4217e4/attachment.pgp
PATCH 2/4 at91_spi: remove register offsets
In reply to Tom RixSince all users of at91_spi have been converted to C struct accessors, the register offsets definitions are no longer needed.
We take this opportunity to do a little bit of reformatting for the register bits definitions.
--- arch/arm/include/asm/arch-at91/at91_spi.h | 153 +++++++++++++---------------- 1 files changed, 68 insertions(+), 85 deletions(-)
arch/arm/include/asm/arch-at91/at91_spi.h +68 -85
@@ -33,90 +33,73 @@ typedef struct at91_spi {at91_pdc_t pdc; } at91_spi_t; -#define AT91_SPI_CR 0x00/* Control Register */ -#define AT91_SPI_SPIEN (1 << 0)/* SPI Enable */ -#define AT91_SPI_SPIDIS (1 << 1)/* SPI Disable */ -#define AT91_SPI_SWRST (1 << 7)/* SPI Software Reset */ -#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ - -#define AT91_SPI_MR 0x04/* Mode Register */ -#define AT91_SPI_MSTR (1 << 0)/* Master/Slave Mode */ -#define AT91_SPI_PS (1 << 1)/* Peripheral Select */ -#define AT91_SPI_PS_FIXED (0 << 1) -#define AT91_SPI_PS_VARIABLE (1 << 1) -#define AT91_SPI_PCSDEC (1 << 2)/* Chip Select Decode */ -#define AT91_SPI_DIV32 (1 << 3)/* Clock Selection [AT91RM9200 only] */ -#define AT91_SPI_MODFDIS (1 << 4)/* Mode Fault Detection */ -#define AT91_SPI_LLB (1 << 7)/* Local Loopback Enable */ -#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ -#define AT91_SPI_DLYBCS (0xff << 24)/* Delay Between Chip Selects */ - -#define AT91_SPI_RDR 0x08/* Receive Data Register */ -#define AT91_SPI_RD (0xffff << 0)/* Receive Data */ -#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ - -#define AT91_SPI_TDR 0x0c/* Transmit Data Register */ -#define AT91_SPI_TD (0xffff << 0)/* Transmit Data */ -#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ -#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ - -#define AT91_SPI_SR 0x10/* Status Register */ -#define AT91_SPI_RDRF (1 << 0)/* Receive Data Register Full */ -#define AT91_SPI_TDRE (1 << 1)/* Transmit Data Register Full */ -#define AT91_SPI_MODF (1 << 2)/* Mode Fault Error */ -#define AT91_SPI_OVRES (1 << 3)/* Overrun Error Status */ -#define AT91_SPI_ENDRX (1 << 4)/* End of RX buffer */ -#define AT91_SPI_ENDTX (1 << 5)/* End of TX buffer */ -#define AT91_SPI_RXBUFF (1 << 6)/* RX Buffer Full */ -#define AT91_SPI_TXBUFE (1 << 7)/* TX Buffer Empty */ -#define AT91_SPI_NSSR (1 << 8)/* NSS Rising [SAM9261 only] */ -#define AT91_SPI_TXEMPTY (1 << 9)/* Transmission Register Empty [SAM9261 only] */ -#define AT91_SPI_SPIENS (1 << 16)/* SPI Enable Status */ - -#define AT91_SPI_IER 0x14/* Interrupt Enable Register */ -#define AT91_SPI_IDR 0x18/* Interrupt Disable Register */ -#define AT91_SPI_IMR 0x1c/* Interrupt Mask Register */ - -#define AT91_SPI_CSR (n) (0x30 + ((n) * 4))/* Chip Select Registers 0-3 */ -#define AT91_SPI_CPOL (1 << 0)/* Clock Polarity */ -#define AT91_SPI_NCPHA (1 << 1)/* Clock Phase */ -#define AT91_SPI_CSAAT (1 << 3)/* Chip Select Active After Transfer [SAM9261 only] */ -#define AT91_SPI_BITS (0xf << 4)/* Bits Per Transfer */ -#define AT91_SPI_BITS_8 (0 << 4) -#define AT91_SPI_BITS_9 (1 << 4) -#define AT91_SPI_BITS_10 (2 << 4) -#define AT91_SPI_BITS_11 (3 << 4) -#define AT91_SPI_BITS_12 (4 << 4) -#define AT91_SPI_BITS_13 (5 << 4) -#define AT91_SPI_BITS_14 (6 << 4) -#define AT91_SPI_BITS_15 (7 << 4) -#define AT91_SPI_BITS_16 (8 << 4) -#define AT91_SPI_SCBR (0xff << 8)/* Serial Clock Baud Rate */ -#define AT91_SPI_DLYBS (0xff << 16)/* Delay before SPCK */ -#define AT91_SPI_DLYBCT (0xff << 24)/* Delay between Consecutive Transfers */ - -#define AT91_SPI_RPR 0x0100/* Receive Pointer Register */ - -#define AT91_SPI_RCR 0x0104/* Receive Counter Register */ - -#define AT91_SPI_TPR 0x0108/* Transmit Pointer Register */ - -#define AT91_SPI_TCR 0x010c/* Transmit Counter Register */ - -#define AT91_SPI_RNPR 0x0110/* Receive Next Pointer Register */ - -#define AT91_SPI_RNCR 0x0114/* Receive Next Counter Register */ - -#define AT91_SPI_TNPR 0x0118/* Transmit Next Pointer Register */ - -#define AT91_SPI_TNCR 0x011c/* Transmit Next Counter Register */ - -#define AT91_SPI_PTCR 0x0120/* PDC Transfer Control Register */ -#define AT91_SPI_RXTEN (0x1 << 0)/* Receiver Transfer Enable */ -#define AT91_SPI_RXTDIS (0x1 << 1)/* Receiver Transfer Disable */ -#define AT91_SPI_TXTEN (0x1 << 8)/* Transmitter Transfer Enable */ -#define AT91_SPI_TXTDIS (0x1 << 9)/* Transmitter Transfer Disable */ - -#define AT91_SPI_PTSR 0x0124/* PDC Transfer Status Register */ +/* Control Register bits */ +#define AT91_SPI_SPIEN (1 << 0)/* SPI Enable */ +#define AT91_SPI_SPIDIS (1 << 1)/* SPI Disable */ +#define AT91_SPI_SWRST (1 << 7)/* SPI Software Reset */ +#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ + +/* Mode Register bits */ +#define AT91_SPI_MSTR (1 << 0)/* Master/Slave Mode */ +#define AT91_SPI_PS (1 << 1)/* Peripheral Select */ +#define AT91_SPI_PS_FIXED (0 << 1) +#define AT91_SPI_PS_VARIABLE (1 << 1) +#define AT91_SPI_PCSDEC (1 << 2)/* Chip Select Decode */ +#define AT91_SPI_DIV32 (1 << 3)/* Clock Selection +[AT91RM9200 only] */ +#define AT91_SPI_MODFDIS (1 << 4)/* Mode Fault Detection */ +#define AT91_SPI_LLB (1 << 7)/* Local Loopback Enable */ +#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ +#define AT91_SPI_DLYBCS (0xff << 24)/* Delay Between Chip Selects */ + +/* Receive data register bits */ +#define AT91_SPI_RD (0xffff << 0)/* Receive Data */ +#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ + +/* Transmit Data Register bits */ +#define AT91_SPI_TD (0xffff << 0)/* Transmit Data */ +#define AT91_SPI_PCS (0xf << 16)/* Peripheral Chip Select */ +#define AT91_SPI_LASTXFER (1 << 24)/* Last Transfer [SAM9261 only] */ + +/* Status Register bits */ +#define AT91_SPI_RDRF (1 << 0)/* Receive Data Register Full */ +#define AT91_SPI_TDRE (1 << 1)/* Transmit Data Register Full */ +#define AT91_SPI_MODF (1 << 2)/* Mode Fault Error */ +#define AT91_SPI_OVRES (1 << 3)/* Overrun Error Status */ +#define AT91_SPI_ENDRX (1 << 4)/* End of RX buffer */ +#define AT91_SPI_ENDTX (1 << 5)/* End of TX buffer */ +#define AT91_SPI_RXBUFF (1 << 6)/* RX Buffer Full */ +#define AT91_SPI_TXBUFE (1 << 7)/* TX Buffer Empty */ +#define AT91_SPI_NSSR (1 << 8)/* NSS Rising [SAM9261 only] */ +#define AT91_SPI_TXEMPTY (1 << 9)/* Transmission Register +Empty [SAM9261 only] */ +#define AT91_SPI_SPIENS (1 << 16)/* SPI Enable Status */ + +/* Chip Select Registers bits */ +#define AT91_SPI_CPOL (1 << 0)/* Clock Polarity */ +#define AT91_SPI_NCPHA (1 << 1)/* Clock Phase */ +#define AT91_SPI_CSAAT (1 << 3)/* Chip Select Active +After Transfer +[SAM9261 only] */ +#define AT91_SPI_BITS (0xf << 4)/* Bits Per Transfer */ +#define AT91_SPI_BITS_8 (0 << 4) +#define AT91_SPI_BITS_9 (1 << 4) +#define AT91_SPI_BITS_10 (2 << 4) +#define AT91_SPI_BITS_11 (3 << 4) +#define AT91_SPI_BITS_12 (4 << 4) +#define AT91_SPI_BITS_13 (5 << 4) +#define AT91_SPI_BITS_14 (6 << 4) +#define AT91_SPI_BITS_15 (7 << 4) +#define AT91_SPI_BITS_16 (8 << 4) +#define AT91_SPI_SCBR (0xff << 8)/* Serial Clock Baud Rate */ +#define AT91_SPI_DLYBS (0xff << 16)/* Delay before SPCK */ +#define AT91_SPI_DLYBCT (0xff << 24)/* Delay between Consecutive +Transfers */ + +/* PDC Transfer Control Register bits */ +#define AT91_SPI_RXTEN (0x1 << 0)/* Receiver Transfer Enable */ +#define AT91_SPI_RXTDIS (0x1 << 1)/* Receiver Transfer Disable */ +#define AT91_SPI_TXTEN (0x1 << 8)/* Transmitter Transfer Enable */ +#define AT91_SPI_TXTDIS (0x1 << 9)/* Transmitter Transfer Disable */ #endif
Signature · 1 line
1.7.0.4
PATCH 3/4 Add new style definition for SPI0_BASE
In reply to Tom RixThe new C struct accessors define new constants for the base address of the peripherals.
--- arch/arm/include/asm/arch-at91/at91cap9.h | 1 + arch/arm/include/asm/arch-at91/at91sam9260.h | 1 + arch/arm/include/asm/arch-at91/at91sam9261.h | 1 + arch/arm/include/asm/arch-at91/at91sam9263.h | 1 + arch/arm/include/asm/arch-at91/at91sam9g45.h | 1 + arch/arm/include/asm/arch-at91/at91sam9rl.h | 1 + 6 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/include/asm/arch-at91/at91cap9.h +1 -0
@@ -53,6 +53,7 @@#define AT91CAP9_ID_IRQ0 30/* Advanced Interrupt Controller (IRQ0) */ #define AT91CAP9_ID_IRQ1 31/* Advanced Interrupt Controller (IRQ1) */ +#define AT91_SPI0_BASE 0xfffa4000#define AT91_PIO_BASE 0xfffff200#define AT91_PMC_BASE 0xfffffc00#define AT91_RSTC_BASE 0xfffffd00
arch/arm/include/asm/arch-at91/at91sam9260.h +1 -0
@@ -50,6 +50,7 @@#define AT91SAM9260_ID_IRQ2 31/* Advanced Interrupt Controller (IRQ2) */ #define AT91_EMAC_BASE 0xfffc4000 +#define AT91_SPI0_BASE 0xfffc8000#define AT91_SDRAMC_BASE 0xffffea00#define AT91_SMC_BASE 0xffffec00#define AT91_MATRIX_BASE 0xffffee00
arch/arm/include/asm/arch-at91/at91sam9261.h +1 -0
@@ -43,6 +43,7 @@#define AT91SAM9261_ID_IRQ1 30/* Advanced Interrupt Controller (IRQ1) */ #define AT91SAM9261_ID_IRQ2 31/* Advanced Interrupt Controller (IRQ2) */ +#define AT91_SPI0_BASE 0xfffc8000#define AT91_SDRAMC_BASE 0xffffea00#define AT91_SMC_BASE 0xffffec00#define AT91_MATRIX_BASE 0xffffee00
arch/arm/include/asm/arch-at91/at91sam9263.h +1 -0
@@ -47,6 +47,7 @@#define AT91SAM9263_ID_IRQ0 30/* Advanced Interrupt Controller (IRQ0) */ #define AT91SAM9263_ID_IRQ1 31/* Advanced Interrupt Controller (IRQ1) */ +#define AT91_SPI0_BASE 0xfffa4000#define AT91_EMAC_BASE 0xfffbc000#define AT91_ECC0_BASE 0xffffe000#define AT91_SDRAMC0_BASE 0xffffe200
arch/arm/include/asm/arch-at91/at91sam9g45.h +1 -0
@@ -51,6 +51,7 @@#define AT91SAM9G45_ID_VDEC 30/* Video Decoder */ #define AT91SAM9G45_ID_IRQ0 31/* Advanced Interrupt Controller */ +#define AT91_SPI0_BASE 0xfffa4000#define AT91_EMAC_BASE 0xfffbc000#define AT91_SMC_BASE 0xffffe800#define AT91_MATRIX_BASE 0xffffea00
arch/arm/include/asm/arch-at91/at91sam9rl.h +1 -0
@@ -44,6 +44,7 @@#define AT91SAM9RL_ID_AC97C 24/* AC97 Controller */ #define AT91SAM9RL_ID_IRQ0 31/* Advanced Interrupt Controller (IRQ0) */ +#define AT91_SPI0_BASE 0xfffcc000#define AT91_SDRAMC_BASE 0xffffea00#define AT91_SMC_BASE 0xffffec00#define AT91_MATRIX_BASE 0xffffee00
Signature · 1 line
1.7.0.4
PATCH 4/4 Support for Calao USB A9263 board based on AT91SAM9263 CPU
In reply to Tom RixThe Calao USB A9263 board is a board manufactured and sold by Calao Systems <http://www.calao-systems.com>. Its components are very similar to the AT91SAM9263EK board, so its configuration is based on the configuration of this board. There are however some
differences: different clocks, no LCD, etc.
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + board/calao/usb-a9263/Makefile | 58 ++++++++++++ board/calao/usb-a9263/config.mk | 24 +++++ board/calao/usb-a9263/partition.c | 38 ++++++++ board/calao/usb-a9263/usb-a9263.c | 186 +++++++++++++++++++++++++++++++++++++ include/configs/usb-a9263.h | 182 ++++++++++++++++++++++++++++++++++++ 8 files changed, 496 insertions(+), 0 deletions(-) create mode 100644 board/calao/usb-a9263/Makefile create mode 100644 board/calao/usb-a9263/config.mk create mode 100644 board/calao/usb-a9263/partition.c create mode 100644 board/calao/usb-a9263/usb-a9263.c create mode 100644 include/configs/usb-a9263.h
MAINTAINERS +4 -0
@@ -700,6 +700,10 @@ Peter Pearse <[email protected]> versatile ARM926EJ-S versatile ARM926EJ-S +Thomas Petazzoni <[email protected]> + + usb-a9263 ARM926EJS (AT91SAM9263 SoC) + Dave Peverley <[email protected]> omap730p2 ARM926EJS
MAKEALL +1 -0
@@ -685,6 +685,7 @@ LIST_at91=" \ SBC35_A9G20 \ TNY_A9260 \ TNY_A9G20 \ + usb_a9263 \ " #########################################################################
Makefile +3 -0
@@ -2890,6 +2890,9 @@ TNY_A9260_config : unconfig @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h @$(MKCONFIG) -a tny_a9260 arm arm926ejs tny_a9260 calao at91 +usb_a9263_config : unconfig + @$(MKCONFIG) -a usb-a9263 arm arm926ejs usb-a9263 calao at91 + ######################################################################## ## ARM Integrator boards - see doc/README-integrator for more info. integratorap_config \
board/calao/usb-a9263/Makefile new file +58 -0
58 lines not on this page · raw message
board/calao/usb-a9263/config.mk new file +24 -0
@@ -0,0 +1,24 @@ +# +# (C) Copyright 2009 +# Thomas Petazzoni, Free Electrons, <[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 +# + +TEXT_BASE = 0x23f00000
board/calao/usb-a9263/partition.c new file +38 -0
@@ -0,0 +1,38 @@ +/* +* (C) Copyright 2008-2009 +* Ulf Samuelsson <[email protected]> +* Thomas Petazzoni, Free Electrons, <[email protected]> +* +* 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> +#include <config.h> +#include <asm/hardware.h> +#include <dataflash.h> + +AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS ]; + +struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS ] = { + {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 ,0 },/* Logical adress, CS */ +}; + +/*define the area offsets*/ +dataflash_protect_t area_list[NB_DATAFLASH_AREA ] = { + {0x00000000 ,0x00001FFF ,FLAG_PROTECT_SET ,0 ,"Bootstrap" }, + {0x00002000 ,0x00003FFF ,FLAG_PROTECT_CLEAR ,0 ,"Environment" }, + {0x00004000 ,0xFFFFFFFF ,FLAG_PROTECT_SET ,0 ,"U-Boot" }, +};
board/calao/usb-a9263/usb-a9263.c new file +186 -0
186 lines not on this page · raw message
include/configs/usb-a9263.h new file +182 -0
182 lines not on this page · raw message
Signature · 1 line
1.7.0.4