summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* mtd: fix 'write: Invalid argument' while writing to nand-bb devicesJan Luebbe2012-07-161-3/+3
| | | | | | | | | | The 'off_t cur_ofs' variable was missed during the 64 bit conversion. For the MEMGETBADBLOCK ioctl, a pointer to a loff_t is needed. Also adjust the debug format strings. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mtd: fix bad block ioctlsSascha Hauer2012-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | Since this commit we interpret the argument to the bad block ioctls as a pointer to a 64bit number: |commit e71c34366808bbe3ce0b166d8710749513af6d81 |Author: Sascha Hauer <s.hauer@pengutronix.de> |Date: Fri Oct 14 11:57:55 2011 +0200 | | mtd: fix arguments to bad block ioctls | | In the Kernel the mtd ioctls expect a pointer to the offset, whereas | barebox interprets the pointer itself as an offset. Since we want | to add 64bit support for file sizes a pointer may not be sufficient, | so align with the kernel and convert it to a pointer to the offset. | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> This missed some places, fix them aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mxs-nand'Sascha Hauer2012-07-028-0/+1874
|\ | | | | | | | | | | | | Conflicts: arch/arm/mach-mxs/Kconfig arch/arm/mach-mxs/Makefile drivers/Makefile
| * mtd nand: add mxs-nand driverWolfram Sang2012-06-303-0/+1265
| | | | | | | | | | | | | | | | | | | | Based on the U-Boot version. Changed to kernel style register layout, added MX23 support (WIP!), made MMU aware and adapted to barebox. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
| * dma: add mxs-apbh-dma driverWolfram Sang2012-06-305-0/+609
| | | | | | | | | | | | | | | | | | Based on the U-Boot version. Changed to kernel style register layout, added MX23 support, made MMU aware and adapted to barebox. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/resource-size'Sascha Hauer2012-07-024-12/+12
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/base/resource.c fs/fs.c
| * | resource: store 'end' instead of 'size' in struct resourceSascha Hauer2012-07-014-12/+12
| |/ | | | | | | | | | | | | | | | | | | Storing the size instead of the resource end in struct resource was a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously leads to problems. 'end' on the other hand will never exceed UINT[32|64]_MAX. Also this way we can express a iomem region covering the whole address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ethernet'Sascha Hauer2012-07-021-15/+57
|\ \
| * | miidev: consistent md and mw on phy regsJohannes Stezenbach2012-06-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dump generated by "md -w -s /dev/phy0" suggests individual registers need to be addressed by byte offset, not by register number. E.g. to set the autonegotiation advertisement register for 10Mbit only, use "mw -w -d /dev/phy0 8+2 0x0061". The current mix of offset == register number, but count == byte count is unintuitive. Also, to be consistent with "md" on /dev/mem, round up the count so "8+1" also works to access one register. However, no attempt is made to do read-modify-write single byte writes. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | miidev: add support for 1000MbitJohannes Stezenbach2012-06-301-2/+29
| | | | | | | | | | | | | | | Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | miidev: actually probe the PHYJohannes Stezenbach2012-06-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Check if the PHY is really accessible (e.g. the PHY address is correct) during probe. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | miidev: fix auto negotiationJohannes Stezenbach2012-06-301-7/+10
| |/ | | | | | | | | | | | | | | The auto negotiation result is the intersect of the advertised abilities and the link partner abilities. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net-designware'Sascha Hauer2012-07-024-0/+683
|\ \
| * | drivers/net: add designware driverJohannes Stezenbach2012-06-264-0/+683
| | | | | | | | | | | | | | | | | | | | | | | | Straight forward port of Synopsys Designware ethernet driver from u-boot v2012.04.01. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/watchdog'Sascha Hauer2012-07-026-1/+200
|\ \ \
| * | | ARM/MXS: add a watchdog driver for i.MX28Juergen Beisert2012-06-293-0/+131
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | Add a simple watchdog frameworkJuergen Beisert2012-06-295-1/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a simple wd command which can setup, trigger and stop a watchdog on the platform. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/sparse'Sascha Hauer2012-07-027-50/+23
|\ \ \ \
| * | | | USB gadget fsl: Put registers into iomem spaceSascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net smc911x: Use __iomem for register baseSascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB ohci: Fix sparse warningsSascha Hauer2012-06-302-34/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - put registers into iomem space - do not use 0 as NULL pointer - use dev_request_mem_region() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | define __user emptySascha Hauer2012-06-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no seperate user address space, so do not generate sparse warnings for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | Do not use iomem space for dev_get_mem_regionSascha Hauer2012-06-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is mostly used for mmapping sdram which is no iomem. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | MMC i.MX esdhc: Fix sparse warningsSascha Hauer2012-06-301-10/+10
| | |_|/ | |/| | | | | | | | | | | | | | | | | | mostly by moving the registers into the correct address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/misc'Sascha Hauer2012-07-021-1/+0
|\ \ \ \
| * | | | Remove superfluous SYSCTL_RSTARoberto Nibali2012-06-301-1/+0
| |/ / / | | | | | | | | | | | | | | | | Signed-off-by: Roberto Nibali <rnibali@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/dma-cache-align'Sascha Hauer2012-07-027-129/+115
|\ \ \ \
| * | | | USB ehci: rework cache handlingSascha Hauer2012-06-302-59/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not need to invalidate the cache in the poll loop anymore since the corresponding bit is now in a dma coherent area. Instead, flush cache before hardware operation and invalidate afterwards. Put the corresponding code inline since it's shorter. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB storage: use dma_alloc where appropriateSascha Hauer2012-06-301-4/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB ehci: put fields of struct qTD directly into struct QHSascha Hauer2012-06-302-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to extend struct qTD with non hardware specific fields. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB ehci: Use dma coherent buffers for qh/qtdSascha Hauer2012-06-301-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no point in syncing them manually. Instead, use dma_alloc_coherent and skip the manual flushing/invalidating. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB core: Allocate tmpbuf using dma_allocSascha Hauer2012-06-301-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be dma save. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB core: device descriptor using dma_allocSascha Hauer2012-06-301-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device descriptor needs to be dma save. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB core: allocate setup_packet using dma_allocSascha Hauer2012-06-301-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setup packet needs to be dma save. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB gadget: Fix dma memory allocationsSascha Hauer2012-06-302-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is another variant of: USB gadget fsl: request cacheline aligned buffer The fsl udc driver allocates a buffer for small requests. The driver then calls dma_inv_range later on it. This buffer happens to be not cacheline aligned which means that a dma_inv_range can corrupt other memory around the buffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [mkl: use dma_alloc] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | USB gadget fsl: request cacheline aligned bufferSascha Hauer2012-06-301-2/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fsl udc driver allocates a buffer for small requests. The driver then calls dma_inv_range later on it. This buffer happens to be not cacheline aligned which means that a dma_inv_range can corrupt other memory around the buffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [mkl: use dma_alloc] Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/64bit'Sascha Hauer2012-07-0217-64/+80
|\ \ \ \
| * | | | make cdev 64bit capableSascha Hauer2012-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Next step to 64bit support: Make cdev size a 64bit type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | use loff_t for file offsetsSascha Hauer2012-06-3015-47/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: fix arguments to bad block ioctlsSascha Hauer2012-06-302-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Kernel the mtd ioctls expect a pointer to the offset, whereas barebox interprets the pointer itself as an offset. Since we want to add 64bit support for file sizes a pointer may not be sufficient, so align with the kernel and convert it to a pointer to the offset. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | Change byte order detection mechanism to kernel styleSascha Hauer2012-06-282-5/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux Kernel defines only one of __LITTLE_ENDIAN and __BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then be tested with #if __BYTE_ORDER == __xx_ENDIAN. As we tend to use a lot of Kernel code in barebox we switch to use the kernel way of determing the byte order. As this always causes a lot of confusion add a check to include/common.h to make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / / ehci: Fix resource sizeSascha Hauer2012-07-021-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have a resource size for the ehci hccr register space. This was assumed to be 0x40 in size. On OMAP though it is only 0x10 and then the hccr resource conflicts with the hcor resource which results in a non working ehci port on beagle and panda boards. This patch adds a nonintrusive workaround, it limits the hccr resource to 0x10, which then also works on OMAP. Later we should drop the multiple resources for the ehci port and make the resource as specified in the datasheets. This is broken since: commit 08845e41fba2b16dd3050b6b910c615e1bb8e57c Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Wed May 23 12:54:24 2012 +0200 usb ehci: Add resource sizes add_usb_ehci_device registers resources with size 0. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / / drivers/base: bail out if request_iomem_region failsSascha Hauer2012-06-271-0/+2
|/ / | | | | | | | | | | | | When request_iomem_region fails we have to bail out instead of dereferencing res->start. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / print out resource_size_t correctlySascha Hauer2012-06-251-1/+2
|/ | | | | | | resource_size_t can be 32bit or 64bit depending on the architecture. Add a define for it to be able to printf a resource_size_t correctly Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* m25p80: progressbar tweakJohannes Stezenbach2012-06-071-2/+2
| | | | | | | | Show progressbar even when erasing just a single sector, otherwise it looks as if erase didn't do anything. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* m25p80: allow erase to be interruptedJohannes Stezenbach2012-06-071-0/+2
| | | | | | | Check for Ctrl-C before erasing each sector. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* m25p80: prevent endless loop in eraseJohannes Stezenbach2012-06-071-0/+2
| | | | | | | | | "erase /dev/myflash0 0+1" erased the whole flash, similar for other value of count if you guessed the erae block size wrong. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'next'Sascha Hauer2012-06-0611-26/+69
|\
| * usb ehci: Add resource sizesSascha Hauer2012-05-311-0/+2
| | | | | | | | | | | | add_usb_ehci_device registers resources with size 0. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * usb ehci: Use zalloc to allocate ehci structureSascha Hauer2012-05-231-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>