9
0
Fork 0
Commit Graph

7091 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
Uwe Kleine-König b78e5fe9f3 commands/crc: assert newline after output with big offsets
This fixes

	barebox@Very long board name:/ crc32 -f /dev/mem 0x83f00000+0xfff
	CRC32 for /dev/mem 0x83fff000 ... 0x83fffffe ==> 0xa080584bbarebox@Very long board name:/

The problem here was that the return value of
lseek(fd, 0x83f00000, SEEK_SET) (which is 0x83f00000) was casted to an
int (which is -2081423360), returned to do_crc and interpreted as
error there without yielding another error message.

This also makes

	crc32 -f /dev/mem 0xffffffff+0x1

die on a NULL pointer exception instead of reporting:

	lseek: No error

:-)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-17 20:41:17 +02:00
Juergen Beisert 2f6b1f7690 ARM/MXS: the GPIO bitkeeper enable logic is inverse to the pullup enable logic
While a set bit enables the pullup (if exists) it disables the bitkeeper (if
exists). Both features are using the same register bit and only one of this
feature is present on a per pin base.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-16 23:30:14 +02:00
Antony Pavlov a540e88965 filetype: add forgotten mips barebox filetype_str
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-16 11:08:53 +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 75821bdef5 ARM: Enable unaligned accesses on armv6 and later
We have the following in the tree:

|commit af42feb9d2
|Author: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
|Date:   Mon Jan 2 11:49:17 2012 +0100
|
|    ARM: set SCTRL[A] only when architecture does not support unaligned access
|
|    Recent gcc generates code with unaligned access when architecture
|    supports it. Setting A bit unconditionally causes data-aborts on such
|    code rendering barebox unusable.
|
|    Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
|    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

What the patch tried is correct: We should set the A bit only when the architecture
does not support unaligned accesses. To figure out whether the architecture supports
unaligned accesses the patch tested for the U bit which is wrong. The U bit may be
0 after a reset, so instead of testing for the U bit we have to set it. This can
be done on armv6 and later. All others have the A bit set to trap unaligned accesses.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-10 19:07:15 +02:00
Sascha Hauer d22b85a203 mem md: bail out without arguments
Without arguments the 'md' command defaults to show address 0 which
likely results in a NULL pointer exception, so only three keystrokes
are necessary to crash barebox. Show usage instead if 'md' is invoked
without arguments, so that it at least requires an address to be given
to crash barebox. This increases the stability of barebox by 66%. Hurray!

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:49:02 +02:00
Sascha Hauer c6e82ee543 ARM i.MX51 babbage: Use correct select for new environment
It's HAVE_DEFAULT_ENVIRONMENT_NEW, not  DEFAULT_ENVIRONMENT_GENERIC_NEW

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 08:39:04 +02:00
Sascha Hauer 8d064097eb fs: fix standard zero, full devices
The standard devices are currently broken since they have
the size ~0. As now files use loff_t as file size which is a signed
type the read implementation gets confused and now returns -1.

The current implementation also has the (somewhat theorical) problem
that we do not have real streaming devices, so /dev/zero went out
of zeroes after reading 4GB (or now LLONG_MAX).

This patch introduces a new cdev flag DEVFS_IS_CHARACTER_DEV and a new
file size flag FILE_SIZE_STREAM which makes it possible to create
real stream devices instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 08:38:22 +02:00
Sascha Hauer cca17e25bf ARM mmu: flush page tables in arm_mmu_remap_sdram()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-03 20:07:03 +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 8c3daadecb Merge branch 'for-next/digi-connect-core' 2012-07-02 11:04:58 +02:00
Sascha Hauer 4f5862d884 Merge branch 'for-next/poweroff' 2012-07-02 11:04:44 +02:00
Sascha Hauer 93d4ea2ac8 Merge branch 'for-next/mips-clocksource' 2012-07-02 11:04:38 +02:00
Sascha Hauer 62fe47768b Merge branch 'for-next/devnull'
Conflicts:
	commands/mem.c
2012-07-02 11:04:25 +02:00
Sascha Hauer c77dd2a81b Merge branch 'for-next/menu' 2012-07-02 11:02:59 +02:00
Sascha Hauer 008d2ba8bf Merge branch 'for-next/mmuinfo' 2012-07-02 11:02:52 +02:00
Sascha Hauer f023835a79 Merge branch 'for-next/mxs-usb'
Conflicts:
	arch/arm/mach-mxs/Makefile
2012-07-02 11:02:39 +02:00
Sascha Hauer 4d499188bf Merge branch 'for-next/mxs-reset'
Conflicts:
	arch/arm/mach-mxs/Makefile
2012-07-02 11:02:10 +02:00
Sascha Hauer 1422cd1878 Merge branch 'for-next/mx28-ocotp'
Conflicts:
	arch/arm/mach-mxs/ocotp.c
2012-07-02 11:01:46 +02:00
Sascha Hauer c9fc3209ac Merge branch 'for-next/fs' 2012-07-02 11:00:41 +02:00
Sascha Hauer 149d4764a3 Merge branch 'for-next/ethernet' 2012-07-02 11:00:33 +02:00
Sascha Hauer a461805f26 Merge branch 'for-next/imx-clko' 2012-07-02 11:00:26 +02:00
Sascha Hauer ecb682dfda Merge branch 'for-next/size-decrease' 2012-07-02 11:00:20 +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 649f558483 Merge branch 'for-next/defconfig' 2012-07-02 10:59:14 +02:00
Sascha Hauer 3a997060d5 Merge branch 'for-next/defenv-2' 2012-07-02 10:59:08 +02:00
Sascha Hauer 7242eb7605 Merge branch 'for-next/basename-dirname' 2012-07-02 10:58:52 +02:00
Sascha Hauer a3251562db Merge branch 'for-next/64bit' 2012-07-02 10:58:32 +02:00
Sascha Hauer 9d0b51ea7e Release v2012.07.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-02 10:31:52 +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
Wolfram Sang 1d3d060ab7 arm: mxs: add write support for ocotp
Since we now can change HCLK and VDDIO, we can now support writing to
OCOTP. Writing is done via a special data register. This is u32, so we
need to fill a temporary buffer when offset or count is not aligned. The
write is also protected by a special device variable.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang dc069093c6 arm: mxs: use consistent naming for #defines for ocotp
Will the code more readable, especially since future additions are
planned.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang 51f4b6926a arm: mxs: refactor timeout routine for ocotp
Let's keep the timeout routine in a central place. We will need it more
often when we add write support.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang 27b1a89e27 arm: mxs: add functions to get/set vddio
Needed for ocotp write.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang a264890e50 arm: mxs: refactor access to power domain
usbphy initializaion needs to access the power supply and has this
embedded. Refactor to a seperate power.c, since we need other accesses
in the future.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Wolfram Sang 0ee2603073 arm: mxs: add POWER_BASE for MX28, too
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:37:41 +02:00
Sascha Hauer 1bb01712a7 of: Fix usage of 0 as NULL pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:55 +02:00
Sascha Hauer 0c1a8aa0c2 fs FAT: fix warning: Using plain integer as NULL pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:55 +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 070bd46c9d ARM i.MX clocksource: put registers in iomem space
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:54 +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