Commit Graph

6769 Commits

Author SHA1 Message Date
Piotr Ziecik
e6a7edbc17 mtd: Remove a printf() from add_mtd_device().
Remove a printf() from add_mtd_device(), which produces spurious output.

Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-24 11:29:53 +01:00
Piotr Ziecik
91809ed51d cfi-mtd: Add cfi-mtd driver.
Add cfi-mtd driver, which exports CFI flash to MTD layer.
This allows CFI flash devices to be used from MTD layer.

Building of the new driver is controlled by CONFIG_FLASH_CFI_MTD
option. Initialization is done by calling cfi_mtd_init() from
flash_init().

Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-24 11:05:25 +01:00
Piotr Ziecik
6ea808efdf cfi_flash: Add interface for flash verbosity control
Add interface for flash verbosity control. It allows
to disable output from low-level flash API. It is useful
when calling these low-level functions from context other
than flash commands (for example the MTD/CFI interface
implmentation).

Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-24 10:55:36 +01:00
Piotr Ziecik
ebc9784ce6 cfi_flash: Export flash_sector_size() function.
Export flash_sector_size() function from drivers/mtd/cfi_flash.c,
so that it can be used in the upcoming cfi-mtd driver.

Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-24 10:55:35 +01:00
Stefan Roese
45aa5a7f4d cfi_flash: Make all flash access functions weak
This patch defines all flash access functions as weak so that
they can be overridden by board specific versions.

This will be used by the upcoming VCTH board support where the NOR
FLASH unfortunately can't be accessed memory-mapped. Special
accessor functions are needed here.

To enable this weak functions you need to define
CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS in your board config header.
Otherwise the "old" default functions will be used resulting
in smaller code.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-11-24 10:55:35 +01:00
Stefan Roese
a5c4067017 UBI: Change parsing of size in commands to default to hex
Currently the size parameters of the UBI commands (e.g. "ubi write") are
decoded as decimal instead of hex as default. This patch now interprets
all these values consistantly as hex, as all other standard U-Boot commands
do.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-24 08:31:16 +01:00
Stefan Roese
de01c76c3c ppc4xx: ML2 shouldn't include the 4xx EMAC driver
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-21 13:06:06 +01:00
Yuri Tikhonov
1a6a00dcc5 ppc4xx: katmai: Change default config
This patch enables support for EXT2, and increases the
CONFIG_SYS_BOOTMAPSZ size for the default configuration
of the katmai boards to use them as the RAID-reference
AMCC setups.

 EXT2 enabling allows one to boot kernels from the EXT2
formatted Compact Flash cards.

 CONFIG_SYS_BOOTMAPSZ increasing allows one to boot the
Linux kernels, which use PAGE_SIZE of 256KB. Otherwise,
the memory area with DTB file (which is placed at the
end of the bootmap area) will turn out to be overlapped
with the BSS segment of the 256KB kernel, and zeroed
in early_init() of Linux.

 Actually, increasing of the bootmap size could be done
via setting of the bootm_size U-Boot variable, but it looks
like the current U-Boot implementation have some bootm_size-
related functionality lost. In many places through the U-Boot
code the CONFIG_SYS_BOOTMAPSZ definition is used directly
(instead of trying to read the corresponding value from the
environment). The same is truth for the boot_jump_linux()
function in lib_ppc/bootm.c, where U-Boot transfers control
to Linux passing the CONFIG_SYS_BOOTMAPSZ (not bootm_size)
value to the booting kernel.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-21 11:08:02 +01:00
Dave Mitchell
ddf45cc758 ppc4xx: Changed 460EX/GT OCM TLB and internal SRAM initialization
Expanded OCM TLB to allow access to 64K OCM as well as 256K of
internal SRAM.

Adjusted internal SRAM initialization to match updated user
manual recommendation.

OCM & ISRAM are now mapped as follows:
        physical        virtual         size
ISRAM   0x4_0000_0000   0xE300_0000     256k
OCM     0x4_0004_0000   0xE304_0000     64k

A single TLB was used for this mapping.

Signed-off-by: Dave Mitchell <dmitch71@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-21 11:02:04 +01:00
Dave Mitchell
b14ca4b61a ppc4xx: Added ppc4xx-isram.h for internal SRAM and L2 cache DCRs
Added include/asm-ppc/ppc4xx-isram.h and moved internal SRAM and
L2 cache DCRs from ppc440.h to this new header.

Also converted these DCR defines from lowercase to uppercase and
modified referencing modules to use them.

Signed-off-by: Dave Mitchell <dmitch71@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-21 10:52:33 +01:00
Steven A. Falco
711e2b2af8 ppc4xx: Delete unused definitions for SDR0_DDRCFG from ppc4xx.h
The definitions of bits in SDR_CFG are incorrect, and not used within
U-Boot.  Therefore, they can be removed.

The naming of the sdr_ddrdl/sdr_cfg registers do not follow conventions,
and are unused, so they can be removed too.

A definition for SDR0_DDRCFG is added.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-21 10:52:09 +01:00
Dirk Behme
e23c7c95a9 ARM: OMAP: Convert IO macros
Convert IO macros to readx/writex.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
2008-11-21 01:44:35 +01:00
Ilko Iliev
263b749e2e lib_arm: do_bootm_linux() - correct a small mistake
This patch corrects a small bug in the "if" condition:
the parameter "flag" is 0 and the "if" condition is always true.
The result is - the boom command doesn't start the kernel.
Affected targets: all arm based.

Signed-off-by: Ilko Iliev <iliev@ronetix.at>
2008-11-21 01:44:35 +01:00
Stelian Pop
3e0cda071a AT91: Enable PLLB for USB
At least some (old ?) versions of the AT91Bootstrap do not set up the
PLLB correctly to 48 MHz in order to make USB host function correctly.

This patch sets up the PLLB to the same values Linux uses, and makes USB
work ok on the following CPUs:
	- AT91CAP9
	- AT91SAM9260
	- AT91SAM9263

This patch also defines CONFIG_USB_STORAGE and CONFIG_CMD_FAT for all
the relevant AT91CAP9/AT91SAM9 atmel boards.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-11-21 01:41:14 +01:00
Stelian Pop
ad229a44e1 AT91: Use AT91_CPU_CLOCK in displays
Introduce AT91_CPU_CLOCK and use it for displaying the CPU
speed in the LCD driver.

Also make AT91_MAIN_CLOCK and AT91_MASTER_CLOCK reflect the
corresponding board clocks.

Signed-off-by: Stelian Pop <stelian@popies.net>
2008-11-21 01:41:14 +01:00
Stefan Roese
25fb4eaaea ppc4xx: Clear all potentially pending exceptions in MCSR
This is needed on Canyonlands which still has an exception pending
while running relocate_code(). This leads to a failure after trap_init()
is moved to the top of board_init_r().

Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-20 11:48:53 +01:00
Heiko Schocher
facdad5f26 powerpc: 83xx: add missing TIMING_CFG1_CASLAT_* defines
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-11-19 18:43:09 -06:00
Howard Gregory
2f2a5c3714 mpc83xx: Improve the performance of DDR memory
modify the CAS timings. my understanding is that these
settings decrease various wait times in the DDR interface.
Because these wait times are in clock cycles, and the DDR
clock on the 8315 RDB runs slower than on some other 83xx
platforms, we can dial down these values without a problem,
thereby decreasing the latency of memory a little.

Signed-off-by: Howard Gregory <Greg.Howard@freescale.com>
Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-11-19 18:42:54 -06:00
Kyungmin Park
8000b086b3 ARM: Add Apollon UBI support
To enable UBI on Apollon you need to uncomment the CONFIG_SYS_USE_UBI
macro.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
694a0b3f1c UBI: Add UBI command support
This patch adds these UBI commands:

ubi part [nand|onenand] [part] - Show or set current partition
ubi info [l[ayout]] -Display volume and UBI layout information
ubi create[vol] volume [size] [type] - Create volume name with size
ubi write[vol] address volume size - Write volume from address with size
ubi read[vol] address volume [size] - Read volume to address with size
ubi remove[vol] volume - Remove volume

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
58be3a1056 UBI: Add basic UBI support to U-Boot (Part 8/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
47ae6693f5 UBI: Add basic UBI support to U-Boot (Part 7/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
7e6ee7ad27 UBI: Add basic UBI support to U-Boot (Part 6/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
c91a719daa UBI: Add basic UBI support to U-Boot (Part 5/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
f412fefa07 UBI: Add basic UBI support to U-Boot (Part 4/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
2d262c4853 UBI: Add basic UBI support to U-Boot (Part 3/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
961df83361 UBI: Add basic UBI support to U-Boot (Part 2/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
f399d4a281 UBI: Add basic UBI support to U-Boot (Part 1/8)
This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
It's based on the Linux UBI version and basically has a "OS"
translation wrapper that defines most Linux specific calls
(spin_lock() etc.) into no-ops. Some source code parts have been
uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
this version with the Linux version and simplifies future UBI
ports/bug-fixes from the Linux version.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Kyungmin Park
e29c22f5ab MTD: Add MTD paritioning infrastructure
This MTD part infrastructure will be used by the upcoming
UBI support.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-11-19 20:34:39 +01:00
Selvamuthukumar
9b827cf172 Align end of bss by 4 bytes
Most of the bss initialization loop increments 4 bytes
at a time. And the loop end is checked for an 'equal'
condition. Make the bss end address aligned by 4, so
that the loop will end as expected.

Signed-off-by: Selvamuthukumar <selva.muthukumar@e-coninfotech.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-11-18 23:13:16 +01:00
Wolfgang Denk
e0b0ec8430 Merge branch 'master' of git://git.denx.de/u-boot-mpc86xx 2008-11-18 21:40:38 +01:00
Becky Bruce
3f510db522 mpc8641: fix address-cells default in old .dts detection
address-cells defaults to 2, not 1; so in the unlikely
event that it isn't specified, this patch is required
for correct operation.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-11 09:44:10 -06:00
Becky Bruce
d025aa4b20 lib_ppc: Move trap_init to occur earlier
Doing trap_init immediately once we're running from RAM
means we're no longer dependent on the physical location of
the flash on non-BookE platforms. Before trap_init, those
platforms switch to real mode and go to 0xfff00100 on exception.
After the switch, they go to 0x00000100  This makes it easier to
move the flash location.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:06 -06:00
Becky Bruce
d52082b12c mpc8641: Try to detect old .dts files
Since we've changed the memory map of the board, be nice and
add some checking to try to catch out-of-date .dts files.  We do
this by checking the CCSRBAR location in the .dts and comparing
it to the CCSRBAR location in u-boot.  If they don't match, a
warning msg is printed.  This isn't foolproof, but it's simple and
will catch most of the cases where an out-of-date .dts is present,
including all of the cases where a new u-boot is used with an old
standard MPC8641 .dts file as supplied with Linux.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:05 -06:00
Becky Bruce
8db0400a27 toplevel Makefile: Add MPC8641HPCN_36BIT target
This will enable CONFIG_PHYS_36BIT for MPC8641HPCN.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:05 -06:00
Becky Bruce
3111d32c49 mpc8641: Support 36-bit physical addressing
This patch creates a memory map with all the devices
in 36-bit physical space, in addition to the 32-bit map.
The CCSR relocation is moved (again, sorry) to
allow for the physical address to be 36 bits - this
requires translation to be enabled.  With 36-bit physical
addressing enabled, we are no longer running with VA=PA
translations.  This means we have to distinguish between
the two in the config file.  The existing region name is
used to indicate the virtual address, and a _PHYS variety
is created to represent the physical address.

Large physical addressing is not enabled by default.
Set CONFIG_PHYS_64BIT in the config file to turn this on.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:05 -06:00
Becky Bruce
c759a01a00 mpc8641: Change 32-bit memory map
The memory map on the 8641hpcn is modified to look more like
the 85xx boards; this is a step towards a more standardized
layout going forward. As part of this change, we now relocate
the flash.

The regions for some of the mappings were far larger than they
needed to be.  I have reduced the mappings to match the
actual sizes supported by the hardware.

In addition I have removed the comments at the head
of the BAT blocks in the config file, rather than updating
them.  These get horribly out of date, and it's a simple
matter to look at the defines to see what they are set to
since everything is right here in the same file.

Documentation has been changed to reflect the new map, as this
change is user visible, and affects the OS which runs post-uboot.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:04 -06:00
Becky Bruce
bf9a8c3430 mpc86xx: Change early FLASH mapping to 1M at CONFIG_MONITOR_BASE_EARLY
We define CONFIG_MONITOR_BASE_EARLY to define the initial location
of the bootpage in flash.   Use this to create an early mapping
definition for the FLASH, and change the early_bats code to use this.

This  change facilitates the relocation of the flash since the early
mappings are no longer tied to the final location of the flash.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:04 -06:00
Becky Bruce
c1e1cf6954 mpc86xx: Use SRR0/1/rfi to enable address translation, not blr
Using a mtmsr/blr means that you have to be executing at the
same virtual address once you enable translation.  This is
unnecessarily restrictive, and is not really how this is
usually done.  Change it to use the more common mtspr SRR0/SRR1
and rfi method.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:03 -06:00
Becky Bruce
6bf98b1362 mpc8641: make DIAG_ADDR == FLASH_BASE
Currently, that's what it is, but it's hardcoded.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:03 -06:00
Becky Bruce
170deacb1d mpc8641: Drop imaginary second flash bank, map 8MB
There's a lot of setup and foo for the second flash
bank.  The problem is, this board doesn't actually have one.
Clean this up.  Also, the flash is 8M in size.  Get rid
of the confusing aliased overmapping, and just map 8M.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:03 -06:00
Becky Bruce
0f2d66027b mpc8641: only define CONFIG_ENV_SIZE once
It's currently defined twice inside in an if/else block, but
both halves set the same value.  Move the define outside
the if.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:02 -06:00
Becky Bruce
24bfb48c35 mpc86xx: Move setup_bats into cpu_init_f
In order to later allow for a physical relocation of the
flash, setup_bats, which sets up the final BAT mapping
for the board, needs to happen *after* init_laws().
Otherwise, there will be no window programmed for the flash
at the new physical location at the point when we change
the mmu translation.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:02 -06:00
Becky Bruce
05df3e5a63 mpc8641: Remove extra "0" from BR2 define
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-11-10 10:10:01 -06:00
Jon Loeliger
33211469f7 Merge commit 'wd/master' 2008-11-10 10:04:51 -06:00
Richard Retanubun
edf3fe7d39 drivers/qe/uec_phy.c: Added PHY-less (fixed PHY) driver.
Copied over the fixed PHY driver as used in pp4xx/4xx_enet.c.
This adds support for PHY-less MAC connections to the UEC.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09 21:38:05 -08:00
TsiChung Liew
54bdcc9fb6 ColdFire: Add mii driver in drivers/net
All CF platforms' mii.c are consolidated into one

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-11-09 21:38:05 -08:00
Ben Warren
25a859066b Moved initialization of PPC4xx EMAC to cpu_eth_init()
Removed initialization of the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
2008-11-09 21:38:05 -08:00
Ben Warren
4d03a4e20e Moved PPC4xx EMAC driver to drivers/net
Also changed path in all linker scripts that reference this driver

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
2008-11-09 21:38:04 -08:00
Ben Warren
96e21f86e8 Changed PPC4xx EMAC driver to require CONFIG_PPC4xx_EMAC
All in-tree IBM/AMCC PPC4xx boards using the EMAC get this new CONFIG

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
2008-11-09 21:38:04 -08:00