9
0
Fork 0
Commit Graph

1417 Commits

Author SHA1 Message Date
Christian Kapeller 1d168baacd input: Add i.MX matrix keypad driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-17 20:45:47 +02:00
Jan Luebbe c410817f19 mtd: fix 'write: Invalid argument' while writing to nand-bb devices
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>
2012-07-16 11:08:47 +02:00
Sascha Hauer 4987f61ee2 mtd: fix bad block ioctls
Since this commit we interpret the argument to the bad block ioctls
as a pointer to a 64bit number:

|commit e71c343668
|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>
2012-07-10 19:07:33 +02:00
Sascha Hauer d04ce5dfe7 Merge branch 'for-next/mxs-nand'
Conflicts:
	arch/arm/mach-mxs/Kconfig
	arch/arm/mach-mxs/Makefile
	drivers/Makefile
2012-07-02 11:08:03 +02:00
Sascha Hauer 1510c57e93 Merge branch 'for-next/resource-size'
Conflicts:
	drivers/base/resource.c
	fs/fs.c
2012-07-02 11:05:57 +02:00
Sascha Hauer 149d4764a3 Merge branch 'for-next/ethernet' 2012-07-02 11:00:33 +02:00
Sascha Hauer 05772f77e8 Merge branch 'for-next/net-designware' 2012-07-02 11:00:05 +02:00
Sascha Hauer 7f9fc3dbd0 Merge branch 'for-next/watchdog' 2012-07-02 10:59:45 +02:00
Sascha Hauer f22d4e2778 Merge branch 'for-next/sparse' 2012-07-02 10:59:37 +02:00
Sascha Hauer 6e4b15537b Merge branch 'for-next/misc' 2012-07-02 10:59:30 +02:00
Sascha Hauer dd3c898d06 Merge branch 'for-next/dma-cache-align' 2012-07-02 10:59:22 +02:00
Sascha Hauer a3251562db Merge branch 'for-next/64bit' 2012-07-02 10:58:32 +02:00
Sascha Hauer 1c136767a2 ehci: Fix resource size
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 08845e41fb
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>
2012-07-02 10:11:05 +02:00
Sascha Hauer 5f03074ea9 resource: store 'end' instead of 'size' in struct resource
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>
2012-07-01 08:18:53 +02:00
Sascha Hauer 7712070e3e USB gadget fsl: Put registers into iomem space
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:55 +02:00
Sascha Hauer f9b94c867b net smc911x: Use __iomem for register base
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer 3af2266149 USB ohci: Fix sparse warnings
- 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>
2012-06-30 22:34:54 +02:00
Sascha Hauer 27c5d37ecc define __user empty
There is no seperate user address space, so do not generate sparse
warnings for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer 6f5ea13f28 Do not use iomem space for dev_get_mem_region
It is mostly used for mmapping sdram which is no iomem.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer cbba269403 MMC i.MX esdhc: Fix sparse warnings
mostly by moving the registers into the correct address space.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +02:00
Sascha Hauer be573120fe make cdev 64bit capable
Next step to 64bit support: Make cdev size a 64bit type.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 3e503822c7 use loff_t for file offsets
This is a first step for 64bit file support: Make the file sizes/offsets
64bit.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer e71c343668 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>
2012-06-30 16:53:16 +02:00
Johannes Stezenbach 8f2fcf6554 miidev: consistent md and mw on phy regs
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>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 99e72c8bbd miidev: add support for 1000Mbit
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 1b725b9c44 miidev: actually probe the PHY
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>
2012-06-30 13:58:18 +02:00
Johannes Stezenbach 467d9d9cee miidev: fix auto negotiation
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>
2012-06-30 13:58:14 +02:00
Wolfram Sang eb76c8e827 mtd nand: add mxs-nand driver
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>
2012-06-30 12:53:36 +02:00
Wolfram Sang 4a39f83320 dma: add mxs-apbh-dma driver
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>
2012-06-30 12:53:36 +02:00
Roberto Nibali 5718688da9 Remove superfluous SYSCTL_RSTA
Signed-off-by: Roberto Nibali <rnibali@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:47:04 +02:00
Sascha Hauer 40faf584cd USB ehci: rework cache handling
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>
2012-06-30 12:46:25 +02:00
Sascha Hauer 9ca0e573af USB storage: use dma_alloc where appropriate
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer 787fa164dd USB ehci: put fields of struct qTD directly into struct QH
This allows us to extend struct qTD with non hardware specific
fields.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer 0128d99352 USB ehci: Use dma coherent buffers for qh/qtd
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>
2012-06-30 12:46:25 +02:00
Sascha Hauer 0c35d2210e USB core: Allocate tmpbuf using dma_alloc
This needs to be dma save.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer 95aea88175 USB core: device descriptor using dma_alloc
The device descriptor needs to be dma save.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer fc52e7e480 USB core: allocate setup_packet using dma_alloc
The setup packet needs to be dma save.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 12:46:25 +02:00
Sascha Hauer 887c7d5c38 USB gadget: Fix dma memory allocations
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>
2012-06-30 12:46:25 +02:00
Sascha Hauer 3f7987af96 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>
2012-06-30 12:46:25 +02:00
Juergen Beisert 7d6d7c42da ARM/MXS: add a watchdog driver for i.MX28
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-29 15:16:34 +02:00
Juergen Beisert 2928591eab Add a simple watchdog framework
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>
2012-06-29 15:16:34 +02:00
Sascha Hauer 51885a7d73 Change byte order detection mechanism to kernel style
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>
2012-06-28 13:49:16 +02:00
Sascha Hauer a6e358b2f5 drivers/base: bail out if request_iomem_region fails
When request_iomem_region fails we have to bail out instead of
dereferencing res->start.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-27 18:31:34 +02:00
Johannes Stezenbach 54edd7cfa9 drivers/net: add designware driver
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>
2012-06-26 17:41:12 +02:00
Sascha Hauer 2ca512e592 print out resource_size_t correctly
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>
2012-06-25 14:45:43 +02:00
Johannes Stezenbach 9c865c1669 m25p80: progressbar tweak
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>
2012-06-07 19:31:33 +02:00
Johannes Stezenbach 2c25d3ec4b m25p80: allow erase to be interrupted
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>
2012-06-07 19:31:33 +02:00
Johannes Stezenbach 011702664f m25p80: prevent endless loop in erase
"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>
2012-06-07 19:31:33 +02:00
Sascha Hauer 497d1c49f4 Merge branch 'next' 2012-06-06 14:11:57 +02:00
Sascha Hauer 08845e41fb 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>
2012-05-31 20:29:10 +02:00