9
0
Fork 0
Commit Graph

8584 Commits

Author SHA1 Message Date
Alexander Aring 9d90e219c1 getopt: change optstring to const char*
Change getopt optstring parameter type to const char *.
Also change type to const char * of tmp variable which
pointed to optstring. This will only handle readonly.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:34 +01:00
Alexander Aring c7a9534359 hush: add getopt only if it enabled
This patch add getopt to the command list if it enabled via
Kconfig. With this patch we get a 'command not found' error.
Otherwise getopt doing nothing.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 20:57:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 650e2daa9f phy/micrel: KSZ9021 diasable Asym Pause support
Due to a hw bug do not enable teh Asym_Pause.
Otherwise if you ser the bit 11 in 4h you will have to unplug
and replug the cable to make the phy work.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 9c305a0dbe macb: add cadence Gigabit GEM support
based on the kernel code
detect it via IP version

In the GEM we can use a full packet buffer for receive but the buffer size
need to be 64bit size aligned.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD aa2095304a macb: fix tx ring size
the mininal tx ring size is 2 as if one we wrap on the same descriptor
and can cause IP lock on GEM (gigabit version) this is always the case

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 19:59:52 +01:00
Jean-Christophe PLAGNIOL-VILLARD 36bcee4892 net macb: reset the IP at init
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:50 +01:00
Jean-Christophe PLAGNIOL-VILLARD 044cb6a298 net macb: enable Tramsmit and Receive at open
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:46 +01:00
Jean-Christophe PLAGNIOL-VILLARD 882ae3da84 net macb: use the macro as in linux for tx/rx buffer ring size
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:42 +01:00
Jean-Christophe PLAGNIOL-VILLARD d702d97a8a net macb: sync remaining define with linux
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2e2466f5ae net macb: call macb_init at probe explicitly
as eth_device init is planning for remove and we need the init before register
the mdio bus

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:34:29 +01:00
Jean-Christophe PLAGNIOL-VILLARD 5169b2d2c7 sama5de3k: add gmacb support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:27:56 +01:00
Alexander Shiyan caf066102e ARM: mmu: Clear unpredictable bits for translation table
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-11 09:26:35 +01:00
Jean-Christophe PLAGNIOL-VILLARD c49819d903 arm: rename reset and common_reset to barebox_arm_reset_vector and arm_cpu_lowlevel_init
reset is confusing with the cpu reset and impossible to grep

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0fcceb6c55 macb: drop non used define
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD a097eabc81 macb: report timeout on send
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:35:39 +01:00
Jean-Christophe PLAGNIOL-VILLARD 554ab80b87 macb: use dev_xx message
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-08 09:34:58 +01:00
Jean-Christophe PLAGNIOL-VILLARD dc50b5bdf5 beagle: add nand partition and boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 10:37:17 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3b4fdb58c0 at91sam9: drop AT91_BASE_SYS for sdram controller
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 10:26:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD ec5cfca170 at91sam926x_lowlevel_init: use struct to pass soc config
this will allow to pass more paraemeter to at91sam926x_lowlevel_init
and drop AT91_BASE_SYS

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 10:26:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6ab43e8434 at91sam926x_lowlevel_init: use pio macro
this will make the code more readble

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 10:26:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD 345fe0a99f at91: gpio: split accessor so we can use them for early init
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 10:26:49 +01:00
Antony Pavlov 3e17c2e58f pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS
Here's the error message:

  LD      arch/mips/pbl/zbarebox
pbl/built-in-pbl.o: In function `decompress_unlzo':
/home/antony/barebox.git.rebased.isp/pbl/decomp.c:35: undefined reference to `free'
pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
(.text.pbl_barebox_uncompress+0x6d0): relocation truncated to fit: R_MIPS_26 against `free'
pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
(.text.pbl_barebox_uncompress+0x6e0): undefined reference to `free'
pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
(.text.pbl_barebox_uncompress+0x6e0): relocation truncated to fit: R_MIPS_26 against `free'
make[1]: *** [arch/mips/pbl/zbarebox] Error 1
make: *** [zbarebox.bin] Error 2

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 09:57:43 +01:00
Antony Pavlov e43e1498f6 MIPS: pbl: fix none compression support
Here's the error message:

  AS      arch/mips/pbl/piggy.shipped.o
  arch/mips/pbl/piggy.shipped.S: Assembler messages:
  arch/mips/pbl/piggy.shipped.S:1: Error: unrecognized opcode `globl input_data'
  make[1]: *** [arch/mips/pbl/piggy.shipped.o] Error 1
  make: *** [zbarebox.bin] Error 2

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-05 09:43:17 +01:00
Sascha Hauer d4f4c9e9a9 Merge branch 'pu/arm-entry' 2013-02-04 19:42:54 +01:00
Sascha Hauer 7f2f5dce49 ARM pbl: inline decompress function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer c2ef9c4af2 ARM: disable HAVE_CONFIGURABLE_MEMORY_LAYOUT
HAVE_CONFIGURABLE_MEMORY_LAYOUT was first meant as a feature, now it's a
feature to remove it. barebox on ARM now completely uses the memory passed
in from the lowlevel code and configures the malloc area and stack space
during runtime making it obsolete to hardcode these values.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer 46fa902064 generic memory layout: fix deps for [MALLOC|STACK]_BASE
Defining STACK_BASE and MALLOC_BASE only makes sense when
either CONFIG_MEMORY_LAYOUT_DEFAULT or CONFIG_MEMORY_LAYOUT_FIXED
is set, so use separate #ifdefs instead ot #if/#else

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer 65f7a718e6 ARM: Automatically determine malloc size
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer b7bcba8b65 ARM: Enable mmu early
This optionally enabled the MMU in the PBL or during early startup for
the non PBL case. The regular MMU init code will pickup the already enabled
MMU later. This might complicate debugging early code, so this has been
made optional.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer 93ef44fc4e ARM: Factor out early mmu code
Move early mmu code to a separate file so that it can be
used from the pbl and the regular image. Disabling the mmu
can be dropped since the regular mmu code is now able to
pickup an enabled mmu.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer 02c0f0bfc8 ARM mmu: pickup already enabled mmu
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer d2a7bed927 ARM pbl: Use dynamic parameters for early malloc space
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer 8e19ee94ab ARM: Setup stack at end of SDRAM
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer 86db57509c ARM start: pickup parameters from pbl
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer fbf7653ea7 ARM start-pbl: call uncompressed binary with arguments
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:41 +01:00
Sascha Hauer c030487301 ARM start-pbl: make board_init_lowlevel_return static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:40 +01:00
Sascha Hauer 91493b1b5d ARM: remove now unused MACH_[HAS|DO]_LOWLEVEL_INIT
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-02-04 15:52:40 +01:00
Sascha Hauer df9d6ebd0d ARM AT91: switch sama5d3 to barebox_arm_entry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2f386d59e0 ARM AT91: switch at91sam9n12 to barebox_arm_entry
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-02-04 15:52:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD 0dc919923d ARM AT91: switch at91sam9x5 to barebox_arm_entry
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-02-04 15:52:40 +01:00
Jean-Christophe PLAGNIOL-VILLARD df8a605453 ARM AT91: switch at91sam9g45 to barebox_arm_entry
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-02-04 15:52:40 +01:00
Sascha Hauer 2a1d33e4f2 ARM AT91: switch at91rm9200 board to barebox_arm_entry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-02-04 15:52:39 +01:00
Sascha Hauer 168b2630e2 ARM AT91: switch at91sam9 to barebox_arm_entry part1
This switches the at91sam926x, 9g10 and 9g20 over to barebox_arm_entry.
For these SoCs we currently support reading back the memory size from
the SDRAM controller, so all of these can have a common reset() function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2013-02-04 15:52:39 +01:00
Sascha Hauer af7e02951e ARM raspberrypi: switch to barebox_arm_entry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer 560c141935 ARM clep7212: switch to barebox_arm_entry
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer 0056cd78fc ARM netx boards: switch to barebox_arm_entry
Only one board supported, the nxdb500. Uses hardcoded SDRAM settings.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer 5dbfea2186 ARM versatile boards: switch to barebox_arm_entry
Only one board, the qemu based Versatile/PB. Uses hardcoded SDRAM settings.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer a6271e0c2a ARM nomadik boards: switch to barebox_arm_entry
Only one board, the nhk8815. This uses hardcoded SDRAM values.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer 02836ae3dd ARM tegra boards: switch to barebox_arm_entry
Only one board, Toshiba AC100. This uses hardcoded SDRAM values.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00
Sascha Hauer b7e7def623 ARM ep93xx boards: switch to barebox_arm_entry
This architecture is a bit strange. It has up to four SDRAM banks, but
all have a quite limited size. The SDRAM size for the different boards
currently is unknown as it's configurable with Kconfig. We use a SDRAM
size based on the value of the only board we have in the defconfigs:
edb9301. This likely breaks other ep93xx boards.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-04 15:52:39 +01:00