summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into nextSascha Hauer2010-11-121-0/+1
|\
| * fb: set id for framebuffer device correctlySascha Hauer2010-11-121-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx nand: Add v3 (i.MX51) supportSascha Hauer2010-11-122-3/+209
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx nand: introduce overwritable check_int functionSascha Hauer2010-11-121-13/+16
| | | | | | | | | | | | needed for v3 support later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx nand: move initialization to preset functionSascha Hauer2010-11-121-39/+71
| | | | | | | | | | | | | | | | | | This has two purposes. First we need to factor out initialization to be able to do something different on v3 type controllers, second with this patch we are independent of preinitialized register values. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mxc_nand: fix correct_data functionSascha Hauer2010-11-121-2/+42
| | | | | | | | | | | | | | | | | | The v2 controller has a totally different mechanism to check whether the data we read had ecc errors or not. Implement this. The mechanism in the v2 controller happens to be identical to the v3 controller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx nand: add V1_V2 namespace to registersSascha Hauer2010-11-121-134/+86
| | | | | | | | | | | | | | | | | | This prepares the driver for v3 support. The v3 controller has a completely different register layout, so add a V1_V2_ namespace to the register defines to avoid confusion with the v3 regs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx nand: do not read-modify-write SPAS registerSascha Hauer2010-11-121-23/+8
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx_nand: make some internally used functions overwriteableSascha Hauer2010-11-121-26/+40
| | | | | | | | | | | | | | | | This patch prepares the driver to add v3 controller support later. The v3 controller is basically the same controller as v1 and v2, but with a completely different register layout. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx nand: remove unnecessary register writeSascha Hauer2010-11-121-12/+1
| | | | | | | | | | | | | | NFC_SP_EN is cleared in probe and never set again, so we do not need to clear it in other functions again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx_nand: rework get_dev_statusSascha Hauer2010-11-121-11/+10
| | | | | | | | | | | | | | | | | | | | We save/restore the value in the buffer anyway, so it makes no difference whether we use main_area0 or main_area1. So, we can use main_area0 and remove main_area1 from the driver which is otherwise unused. Also, clean up the comments in get_dev_status. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx_nand: remove 0xe00 offset from registersSascha Hauer2010-11-121-21/+21
| | | | | | | | | | | | | | Add the offset to the register base instead. This is done in preparation for v3 controller support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | NAND: reset chips before usage like the kernel doesSascha Hauer2010-11-121-0/+6
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* doc: fix parameter name in mci-coreRobert Schwebel2010-10-221-1/+1
| | | | | | | | | | | Silence this warning: drivers/mci/mci-core.c:1324: Warning: argument `pdata' of command @param is not found in the argument list of mci_register(struct mci_host *host) drivers/mci/mci-core.c:1324: Warning: The following parameters of mci_register(struct mci_host *host) are not documented: parameter host Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: align data for commandsSascha Hauer2010-10-221-6/+6
| | | | | | | | | | | Some mci controllers cannot transfer data with their DMA engines if the data is not sufficiently aligned. Normally this is a driver problem, but hey, we have no problem aligning the data and keep the burden from the drivers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Juergen Beisert <jbe@pengutronix.de> Acked-by: Juergen Beisert <jbe@pengurtronix.de>
* fb: i.MX IPU: fold mx3fb_set_par into its only userSascha Hauer2010-10-221-22/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb: i.MX IPU: move fb_info initialization to a single functionSascha Hauer2010-10-221-28/+35
| | | | | | | | | | The bitfield information was only added to fb_info when the framebuffer actually was enabled. That made it impossible to call 'bmp' before enabling the display. So, move all fb_info init to a single place and make it a function to better allow for multiple displays later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb: i.MX IPU: remove unnecessary printfSascha Hauer2010-10-221-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci-core: add multiple block supportSascha Hauer2010-10-221-8/+29
| | | | | | | | | So far only for reading blocks. This is based on the corresponding U-Boot code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Juergen Beisert <jbe@pengutronix.de> Acked-by: Juergen Beisert <jbe@pengurtronix.de>
* i.MX nand: optimize nand boot code for sizeSascha Hauer2010-10-222-62/+150
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX serial: sparse fixesSascha Hauer2010-10-211-42/+47
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fec_imx: sparse fixesSascha Hauer2010-10-212-7/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Adapt the i.MX23 MCI driver to the v2 i.MX23 patch seriesJuergen Beisert2010-10-211-5/+5
| | | | | | | | | The i.MX23 v2 architecture patch series was sligthly modified to easify the i.MX28 architecture addition later on. So, we need now an index to query the SSP clock frequency. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make the clock calculation easier to read and correctJuergen Beisert2010-10-211-7/+7
| | | | | | | | | | | Due to a wrong rounding while calculating the clock divider the requested clock of 25 MHz resulted into a 48 MHz clock. With this patch a clock frequency below or equal the requested one will be set. By using 'div' and 'rate' as vars, its also easier to check against the data sheet. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fsl_udc: fix warningEric Bénard2010-10-211-1/+2
| | | | | | | | | | | | this patch fix the following warning : drivers/usb/gadget/fsl_udc.c: In function 'done': drivers/usb/gadget/fsl_udc.c:566: warning: passing argument 1 of 'dma_inv_range' makes integer from pointer without a cast arch/arm/include/asm/mmu.h:24: note: expected 'long unsigned int' but argument is of type 'void *' drivers/usb/gadget/fsl_udc.c:566: warning: passing argument 2 of 'dma_inv_range' makes integer from pointer without a cast arch/arm/include/asm/mmu.h:24: note: expected 'long unsigned int' but argument is of type 'void *' Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* epautoconf: fix compile errorEric Bénard2010-10-141-0/+1
| | | | | | | | | | | | | | this patch fix the following error : CC drivers/usb/gadget/epautoconf.o drivers/usb/gadget/epautoconf.c:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned' drivers/usb/gadget/epautoconf.c: In function 'ep_matches': drivers/usb/gadget/epautoconf.c:168: error: 'epnum' undeclared (first use in this function) drivers/usb/gadget/epautoconf.c:168: error: (Each undeclared identifier is reported only once drivers/usb/gadget/epautoconf.c:168: error: for each function it appears in.) drivers/usb/gadget/epautoconf.c: In function 'usb_ep_autoconfig_reset': drivers/usb/gadget/epautoconf.c:304: error: 'epnum' undeclared (first use in this function) Signed-off-by: Eric Bénard <eric@eukrea.com>
* mci-core: add more tested SD CardsEric Bénard2010-10-141-0/+3
| | | | | | | | note : - Transcend 16GiB fails (no log) - Micron 8GiB eMMC fails (hangs after : Detecting a 4.0 revision card) Signed-off-by: Eric Bénard <eric@eukrea.com>
* Merge branch 'mx51' into nextSascha Hauer2010-10-1224-290/+1370
|\ | | | | | | | | | | | | Conflicts: arch/arm/Makefile Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: mark 'old Canon SD 16 MiB' as workingJuergen Beisert2010-10-111-1/+1
| | | | | | | | | | | | | | This card is working since 'mci: handle SD cards < 2.0 correctly' Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Jürgen Beisert <jbe@pengutronix.de>
| * imx_serial: Add mx51 supportSascha Hauer2010-10-111-1/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: align write buffer if necessarySascha Hauer2010-10-111-1/+15
| | | | | | | | | | | | | | | | | | | | Most SD controllers need some kind of alignment for writing blocks. Instead of coding this in every driver, align write blocks to a 4 byte alignment in the mci layer. For DMA accesses we may need bigger alignment, but let's solve this problem when we have it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: handle SD cards < 2.0 correctlySascha Hauer2010-10-111-17/+7
| | | | | | | | | | | | | | | | With SD cards older than 2.0 the sd_send_if_cond() fails. Do not assume it's an MMC card in this case. Instead, assume it's a MMC card if sd_send_op_cond() fails. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mfd mc13892: support reading the revisionSascha Hauer2010-10-111-0/+62
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mfd mc13892: Add spi supportSascha Hauer2010-10-112-10/+111
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * move include files for mfd drivers to include/mfdSascha Hauer2010-10-116-6/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Move mfd drivers to drivers/mfdSascha Hauer2010-10-1114-28/+36
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * spi i.MX: Add i.MX51 supportSascha Hauer2010-10-112-8/+171
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * spi i.MX: redirect functions to version specific functionsSascha Hauer2010-10-111-10/+62
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * spi i.MX: add spi version namespace to register definesSascha Hauer2010-10-111-58/+58
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: print error code on failureSascha Hauer2010-10-111-4/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: Add i.MX esdhc supportSascha Hauer2010-10-114-0/+690
| | | | | | | | | | | | | | | | | | This adds a driver for the esdhc controller found on Freescale i.MX25/35/51 SoCs. This code is based on the U-Boot driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Add the driver for the i.MX23 debug UARTJuergen Beisert2010-10-113-0/+208
|/ | | | | | | The i.MX23 comes with a special UART dedicated for debugging purposes. This one is mostly used for the console the user can reach. Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
* mci: Add i.MX27/31 driverSascha Hauer2010-10-113-0/+528
| | | | | | Add i.MX27/31 driver Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add S3C2440 MCI card supportJuergen Beisert2010-10-113-0/+825
| | | | | | | | | | Adding MCI card support for S3C2440 CPUs. This is for reference only, as there is currently no user in the barebox tree. Maybe one with access to the A9M2440 development kit can check it on his/her system. Checked here with my own S3C2440 based system which is not in the barebox tree. Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add i.MX23 MCI card supportJuergen Beisert2010-10-113-0/+707
| | | | | | | | | Adding MCI card support for STM378x/i.MX23 CPUs. This is for reference only, as this architecture is currently not part of barebox (but will coming soon). Its tested on the i.MX23 based ChumbyOne. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add MCI card support to bareboxJuergen Beisert2010-10-115-0/+1366
| | | | | | | This adds the basic framework to handle MCI cards in barebox. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Don't try to guess the size of a disk if its size value is already givenJuergen Beisert2010-10-111-9/+18
| | | | | | | | | | | | | | | | | Guessing the size of an attached harddisk (access via x86 BIOS) was needed due to the fact, barebox can't query this information from the BIOS easily. But with the SD/MMC cards, there will be a second user of the generic disk handling routines. And with this media it is very easy to know its size. This patch provides a workaround to keep the guessing feature if the size of the registered disk is 0. If it is not 0, the given value will be used instead. Note: This is in preparation to add MCI card support, which can be handled like a disk drive. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Don't use a sector buffer on stackJuergen Beisert2010-10-111-5/+12
| | | | | | | | | | | | | | | Using a temp. buffer for a disk sector on the stack, seems not work. Doing so lets the system run crazy (the stack seems to be destroyd). Don't know the correct stack handling on ARM, but (IMHO) I also can exclude any writing across the buffer boundaries. Using a temp. buffer via malloc() runs also on ARM. Note: This patch was required to add MCI card support, which can be handled like a disk drive. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make the disk driver less noisyJuergen Beisert2010-10-111-1/+2
| | | | | | | | | | | | In real life this output is only a "nice to have", but most of the time its useless and confusing. So, make it a debug feature for the interested developer. Note: This is in preparation to add MCI card support, which mostly come with a partition table and can be handled like a disk drive. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* x-functions do not return in case of failure.Juergen Beisert2010-10-111-4/+0
| | | | | | | | Remove error handling, because in case of failure the xzalloc() function does not return. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>