9
0
Fork 0
Commit Graph

8176 Commits

Author SHA1 Message Date
Wolfram Sang b44d0e4528 lib: add libubigen
Imported from mtd-utils and stripped down to needed functionality.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:31:24 +01:00
Wolfram Sang 0b23b9159d lib: add libscan
Imported from mtd-utils and stripped down to needed functionality.
Add prefix to functions so we have a clean namespace.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:31:23 +01:00
Wolfram Sang 48987907c6 mtd: utils: apply macros for message printouts
mtd-utils have a few macros for printouts. Provide the wrappers to make
it easier to import them.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:31:23 +01:00
Wolfram Sang 8c98a5dfb7 devfs & mtd: add MEMERASE ioctl support
To make that, we need to shift mtd_erase before mtd_ioctl.
ubi-utils need that, especially ubiformat.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:31:23 +01:00
Wolfram Sang 68e00c165c ubi: bump ubi-media.h to newest version
Needed for ubiformat, we are interested in image_seq especially.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:30:56 +01:00
Wolfram Sang 52e60618d6 ubi: consolidate ubi-media.h
We have two versions in the tree. Use the newer one, and put it into the
mtd directory while we are at it.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:30:56 +01:00
Wolfram Sang 4f03bc5d9f lib: update size_human_readable to latest version
Copy over the latest version from u-boot which handles bigger sizes now
and does arithmetic with shifts instead of divisions.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:30:56 +01:00
Wolfram Sang 904adb80d4 lib: misc: add 'iB' suffixes to strtoull_suffix
Since this is the 'official' notation, we should support it.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:30:56 +01:00
Wolfram Sang 1bd4283c08 mtd: drop custom is_power_of_2()
We have proper version in log2.h these days.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:30:56 +01:00
Wolfram Sang d723373013 nand: mxs: NO_SUBPAGE_WRITE flag was overwritten
It is not the chip, but this controller which cannot do subpage writes.
So, make sure we add the flag at the proper place, so it doesn't get
overwritten by flash detection anymore.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-19 10:27:22 +01:00
Wolfram Sang b6accb5e56 commands: flash: add missing newlines to error messages
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-14 08:43:44 +01:00
Sascha Hauer 0ccb9aebcd Merge branch 'pu/net-link' 2012-12-13 16:26:19 +01:00
Sascha Hauer 2c9ebcb856 Merge branch 'pu/devchild' 2012-12-13 16:24:44 +01:00
Sascha Hauer dfb2f22670 ARM i.MX31 pcm037: remove unused defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:01:56 +01:00
Sascha Hauer 248f795d83 ARM i.MX31 pcm037: make board bootable again
This enables the di in the IPU_CONF register. Otherwise the board
refuses to start.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:01:42 +01:00
Sascha Hauer ec7faef3ba ARM i.MX31 pcm037: Force internal phy
The smsc911x has a bootstrap pin for detecting an external phy.
Unfortunately this is pulled into the wrong direction on the pcm037
board, so force internal phy with platform data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:01:33 +01:00
Sascha Hauer 679f5277ff ARM i.MX31: Fix gpio device names
Has to be imx31-gpio, not imx-gpio.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 21:01:21 +01:00
Sascha Hauer a1a50a4654 net phylib: force to wait for link
When starting a network device wait until the link is up. Otherwise
autobooting does not work with little timeout and several attempts
have to be made until the network is finally up.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 20:02:44 +01:00
Sascha Hauer 11cb1620fe esdctl: fix reset default bug on i.MX27/31
The i.MX27/31 have the second chip select enabled by reset default.
This can be considered as a hardware bug, because even boards which
need this settings cannot work out of reset because of the missing
initialization sequence. Detect this reset default setting and disable
this chipselect then to be able to properly detect the SDRAM size.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 19:59:38 +01:00
Sascha Hauer 1a9e93cc81 drivers/base: fix corrupt device tree
dev_add_child is a very unsafe function. If called multiple times
it allows setting the same device to different parents thus corrupting
the siblings list. This happens regularly since:

| commit c2e568d19c
| Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| Date:   Sat Nov 3 16:11:05 2012 +0100
|
|    bus: add bus device
|
|    automatically add it as parent of any bus device if none already specified
|
|    we have now a nice output per bus

If for example a FATfs is mounted this nice output per bus often ends with:

>     `---- fat0
>     `---- 0
>          `---- 0x86f0000087020031-0x86f000410df27124: /dev/<NULL>
>          `---- sram00
>               `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
>               `---- 0x00000000-0xffffffffffffffff: /dev/<NULL>
>               unable to handle NULL pointer dereference at address 0x0000000c
> pc : [<87f08a20>]    lr : [<87f08a04>]
> sp : 86eff8c0  ip : 87f3fbde  fp : ffffffff
> r10: ffffffff  r9 : 00000000  r8 : 00000003
> r7 : 86f075b8  r6 : 00000002  r5 : ffffffec  r4 : 86f07544
> r3 : 00000000  r2 : 43f900b4  r1 : 00000020  r0 : 00000005
> Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32
> [<87f08a20>] (do_devinfo_subtree+0x90/0x130) from [<87f08a90>] (do_devinfo_subtree+0x100/0x130)
>
> [<87f3e070>] (unwind_backtrace+0x0/0x90) from [<87f28514>] (panic+0x28/0x3c)
> [<87f28514>] (panic+0x28/0x3c) from [<87f3e4b8>] (do_exception+0x10/0x14)
> [<87f3e4b8>] (do_exception+0x10/0x14) from [<87f3e544>] (do_data_abort+0x2c/0x38)
> [<87f3e544>] (do_data_abort+0x2c/0x38) from [<87f3e268>] (data_abort+0x48/0x60)

This patch fixes this by adding a device to its parents children list in
register_device so that dev_add_child is no longer needed. This function
is removed from the tree. Now callers of register_device have to clearly
set the parent *before* registering a device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Jan Lübbe <jlu@pengutronix.de>
2012-12-12 15:04:27 +01:00
Sascha Hauer c7c9c88cc2 fs: move dev_add_child before device_register
Biology tells us that the parent is known before the child is born.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-12 14:49:05 +01:00
Sascha Hauer 025d80a05d net phylib: Call phy_update_status when no link is present
We call phy_update_status only once in 5 seconds. This makes
sure we do not have great overhead when using ethernet devices.
However, if phylib tells us the link is down anyway, there won't
be ethernet transfers, so it doesn't hurt to call phy_update_status
in this case. This makes sure we can use the ethernet device when
the link comes up and do not have an additional 5 second penalty
in this case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 17:54:06 +01:00
Sascha Hauer ac48b10467 net phylib: Clear BMCR_PDOWN bit
Some phys come up with this bit set, clear it so that these phys
can work. This has been observed with a ASIX compatible USB ethernet
adapter.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 17:52:55 +01:00
Sascha Hauer 039a0e52f8 ARM omap3: Call common_reset
omap3 has a soc specific reset function, make sure it calls common_reset
so that the proper CPU flags are set.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 17:51:25 +01:00
Sascha Hauer ab4e9edf86 ARM startup: Ensure CR_A flag is cleared on architectures >= ARMv6
We allow unaligned accesses on ARMv6 onwards, make sure the CR_A
flag is cleared so that unaligned accesses do not trap.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 17:50:03 +01:00
Sascha Hauer 8030ab24fa Merge branch 'kconfig' 2012-12-08 12:22:21 +01:00
Alexander Shiyan c209c186e0 Fix wrong Kconfig reference to ARCH_IMX31
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan f544baed50 Remove bad Kconfig reference to MTD_NAND
Barebox not contain symbol MTD_NAND, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 9b7b1412e0 Remove bad Kconfig reference to HAS_PCI
Barebox not contain symbol HAS_PCI, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 0957cd8d4b Remove bad Kconfig reference to DISK_DRIVE
Barebox not contain symbol DISK_DRIVE, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 6bfc380c91 Remove bad Kconfig reference to HAVE_CLK
Barebox not contain symbol HAVE_CLK, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan e3d0ea26be Remove bad Kconfig reference to HAVE_MMU
Barebox not contain symbol HAVE_MMU, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan f6984b8b88 Remove bad Kconfig reference to HAS_CFI
Barebox not contain symbol HAS_CFI, so remove all references to it.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
Alexander Shiyan 4c20f9af97 Cleanup Kconfig files
This patch provides a global cleanup barebox Kconfig files. This includes
replacing spaces to tabs, formatting in accordance format, removing
extraneous lines and spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:22:12 +01:00
张忠山 6d7dcfbccf let kbuild build foo/bar.o correctly
When obj-y has foo/bar.o, kbuild can't generate
foo/bar.o according foo/bar.c. Fix this

this patch based on linux kernel
commit 521cb40b0c44418a4fd36dc633f575813d59a43d

Signed-off-by: 张忠山 <zzs213@126.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:18:53 +01:00
Sascha Hauer e7509bfbab Merge branch 'for-next/tftp' 2012-12-07 16:43:24 +01:00
Sascha Hauer 8f32824c6e Merge branch 'for-next/phylib'
Conflicts:
	drivers/net/phy/phy.c
2012-12-07 16:43:21 +01:00
Sascha Hauer 759946809a Merge branch 'for-next/omap' 2012-12-07 16:43:16 +01:00
Sascha Hauer df1d2a7257 Merge branch 'for-next/mtd' 2012-12-07 16:43:15 +01:00
Sascha Hauer 86ee7f112f Merge branch 'for-next/misc' 2012-12-07 16:43:15 +01:00
Sascha Hauer 36a886a9f7 Merge branch 'for-next/mfd' 2012-12-07 16:43:15 +01:00
Sascha Hauer 116c24e99e Merge branch 'for-next/mem-commands' 2012-12-07 16:43:15 +01:00
Sascha Hauer 0edc0a4678 Merge branch 'for-next/mci' 2012-12-07 16:43:15 +01:00
Sascha Hauer db5e43eade Merge branch 'for-next/led' 2012-12-07 16:43:15 +01:00
Sascha Hauer 0ae4b1e827 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/mach-imx/include/mach/devices-imx53.h
2012-12-07 16:43:12 +01:00
Sascha Hauer c3a84a3f76 Merge branch 'for-next/ext4' 2012-12-07 16:42:04 +01:00
Sascha Hauer a0643f615d Merge branch 'for-next/driver' 2012-12-07 16:42:04 +01:00
Sascha Hauer e537392052 Merge branch 'for-next/commands' 2012-12-07 16:42:04 +01:00
Sascha Hauer 4bdb250c9f Merge branch 'for-next/clk' 2012-12-07 16:42:04 +01:00
Sascha Hauer 6bf55c7c63 Merge branch 'for-next/ata' 2012-12-07 16:42:04 +01:00