]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-ti
Wolfgang Denk [Tue, 10 Aug 2010 20:20:51 +0000 (22:20 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ti

13 years agoMerge branch 'master' of ../master
Wolfgang Denk [Tue, 10 Aug 2010 20:20:27 +0000 (22:20 +0200)]
Merge branch 'master' of ../master

13 years agoPXA: Declare __io for vpac270 IDE
Marek Vasut [Sun, 8 Aug 2010 13:55:52 +0000 (15:55 +0200)]
PXA: Declare __io for vpac270 IDE

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoPXA: Fix missing includes
Marek Vasut [Sun, 8 Aug 2010 13:55:51 +0000 (15:55 +0200)]
PXA: Fix missing includes

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoPXA: Fix off-the-tree build problems
Marek Vasut [Sun, 8 Aug 2010 13:55:50 +0000 (15:55 +0200)]
PXA: Fix off-the-tree build problems

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoconfig.mk: avoid -traditional-cpp on OS X 10.5
Mike Frysinger [Tue, 3 Aug 2010 23:17:38 +0000 (19:17 -0400)]
config.mk: avoid -traditional-cpp on OS X 10.5

Simply trying to include a basic header file like stdlib.h on OS X 10.5
and then building with -traditional-cpp fails with lots of errors like:
In file included from /usr/include/stdlib.h:63,
                 from test.c:3:
/usr/include/available.h:85: error: stray '#' in program
/usr/include/available.h:85: error: syntax error before numeric constant
/usr/include/available.h:86: error: stray '#' in program

In the past, I hadn't noticed because the old logic for these flags were
restricted to Darwin running on PowerPC systems while I'm running on an
Intel system.  But after some recent clean ups and changes, the flag was
being applied to all Darwin systems and my host tools broke.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agofdt: Fix bug in size calculation in fdt_resize() with initrd use
Feng Wang [Tue, 3 Aug 2010 14:22:43 +0000 (16:22 +0200)]
fdt: Fix bug in size calculation in fdt_resize() with initrd use

Original bug description from Feng (fdt_resize() bug caused "WARNING:
could not set linux, initrd-start FDT_ERR_NOSPACE."):

What I got is an error: "WARNING: could not set linux,initrd-start
FDT_ERR_NOSPACE." after loading Device Tree blob. This in turn caused
linux to miss init part.

After some digging, I found out the reason for this error, it is caused
by fdt_resize().

FDT blob got resized after filling in all board specific information of
PowerPC. (in boot_body_linux()). It reduced blob size with only extra
space for two fdt_reserve_entry, one for fdt itself, and one for initrd.
Then it's aligned to a 0x1000 page boundary. However, later in
fdt_initrd(), it could add two more properties, initrd-start AND
initrd-end, each one needs at least two fdt_reserve_entry sizes done by
_fdt_add_property() (name and value). Thus, the two fdt_reserve_entry
extra space is not sufficient.

So for some specific fdt size which is just under the page boundary
after resizing, this will cause an error of FDT_ERR_NOSPACE in
fdt_initrd() when setting those two properties, and failed to pass
initrd information to linux.

My fix is in fdt_resize(), leave at least 4 fdt_reserve_entry for
initrd. So instead of 2*sizeof(struct fdt_reserve_entry) for
actual_totalsize, use 5*sizeof(struc fdt_reserve_entry).

Stefan: I got this same error on katmai, when trying to boot with
initrd (run flash_self). This patch fixes this issue.

Signed-off-by: Feng Wang <fwang02@harris.com>
Tested-by: Stefan Roese <sr@denx.de>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
13 years agoboard/purple/flash.c: removed unneded variable
Frans Meulenbroeks [Sun, 1 Aug 2010 08:10:41 +0000 (10:10 +0200)]
board/purple/flash.c: removed unneded variable

removed a variable that was not used

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
13 years agovarious cmd_* files: fixed layout a little bit
Frans Meulenbroeks [Sat, 31 Jul 2010 13:01:53 +0000 (15:01 +0200)]
various cmd_* files: fixed layout a little bit

Most of the files have U_BOOT_CMD on a separate line,
but a few didn't and had the first line on the same line
as U_BOOT_CMD.

This changes these files by adding a line break and a tab

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
13 years agovarious cmd_* files: remove the command name from the help message
Frans Meulenbroeks [Sat, 31 Jul 2010 13:01:52 +0000 (15:01 +0200)]
various cmd_* files: remove the command name from the help message

removed the command name from the help message as it is already printed.
for cmd_mmc also rewrote the message a little bit

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
13 years agotools/env/fw_printenv: Make redundant env work on locked flashes also
Detlev Zundel [Fri, 30 Jul 2010 09:22:15 +0000 (11:22 +0200)]
tools/env/fw_printenv: Make redundant env work on locked flashes also

The invalidation of the old environment instance did not work for flashes
supporting hardware locking.  Now we unlock/lock around this update also.

Signed-off-by: Detlev Zundel <dzu@denx.de>
13 years agoflash_protect: check for NULL flash info
Mike Frysinger [Thu, 29 Jul 2010 03:45:03 +0000 (23:45 -0400)]
flash_protect: check for NULL flash info

If a flash is unable to be detected, and then someone calls flash_protect
on it (like the common code does in flash_init), the flash_protect logic
will dereference a NULL pointer.

Since flash_protect already does sanity checking on the info structs, add
a NULL pointer check in there.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agogetenv_f(): fix handling of too short buffers
Wolfgang Denk [Sat, 24 Jul 2010 20:16:20 +0000 (22:16 +0200)]
getenv_f(): fix handling of too short buffers

Fix error handling in getenv_f() when the user provided buffer is too
short to hold the variable name; make sure to truncate and
NUL-terminate without overwriting the buffer limits.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodataflash mmc mux: use common cmd_usage function
Mike Frysinger [Thu, 29 Jul 2010 17:42:10 +0000 (13:42 -0400)]
dataflash mmc mux: use common cmd_usage function

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agomflash: use common cmd_usage function
Mike Frysinger [Thu, 29 Jul 2010 17:42:29 +0000 (13:42 -0400)]
mflash: use common cmd_usage function

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoprint_buffer: optimize & shrink
Mike Frysinger [Fri, 23 Jul 2010 10:17:30 +0000 (06:17 -0400)]
print_buffer: optimize & shrink

Applying a little creative format string allows us to shrink the initial
data read & display loop by only calling printf once.  Re-using the local
data buffer to generate the string we want to display then allows us to
output everything with just one printf call instead of multiple calls to
the putc function.

The local stack buffer needs increasing by 1 byte, but the resulting code
shrink and speed up is worth it I think.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agocmd editing: optimize/shrink output blanking
Mike Frysinger [Fri, 23 Jul 2010 09:28:15 +0000 (05:28 -0400)]
cmd editing: optimize/shrink output blanking

No need to output spaces 1 char at a time in a loop when the printf code
can do the same thing with the right format string.  This shrinks things
and gives a nice speed up when killing off lines more than a byte or two
as printf will send out the buffer in one big chunk.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years ago8xx, kup4k/kup4x: add FDT support
Heiko Schocher [Mon, 19 Jul 2010 21:47:08 +0000 (23:47 +0200)]
8xx, kup4k/kup4x: add FDT support

Signed-off-by: Heiko Schocher <hs@denx.de>
13 years ago8xx, kup4k/kup4x: configuration changes, code cleanup
Heiko Schocher [Mon, 19 Jul 2010 21:46:48 +0000 (23:46 +0200)]
8xx, kup4k/kup4x: configuration changes, code cleanup

- nfs-options removed
- hda->sda changed
- mtd parts added
- loadaddress changed
- cmd-line length increased
- lcd stuff removed
- code cleanup (use I/O accessors etc.)

Signed-off-by: Klaus Heydeck <heydeck@kieback-peter.de>
13 years agofdt relocate: have more attention to use a bootmap or not
Stephan Linz [Fri, 25 Jun 2010 16:04:59 +0000 (18:04 +0200)]
fdt relocate: have more attention to use a bootmap or not

Platforms with flat device tree support can use a bootmap to relocate
the fdt_blob. This is not a must. That's why the relocation function
boot_relocate_fdt() should be use only if CONFIG_OF_LIBFDT was defined
together with CONFIG_SYS_BOOTMAPSZ (see common/cmd_bootm.c).

On MicroBlaze platforms there is no need to use a bootmap to relocate
a fdt blob. So we need a more precise focus on the compilation and usage
of boot_relocate_fdt().

In general it is valid to exclude the function boot_relocate_fdt() if
the bootmap size CONFIG_SYS_BOOTMAPSZ is not defined.

Signed-off-by: Stephan Linz <linz@li-pro.net>
13 years agoAdd mkimage manpage
Nobuhiro Iwamatsu [Wed, 16 Jun 2010 01:38:24 +0000 (10:38 +0900)]
Add mkimage manpage

Some Linux distributions include the "mkimage" as a package.
This commit provides a manual page for mkimage.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Added documentation for FIT images and examples.
Moved to doc/ directory.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoLZMA and LZO causes compile error
Matthias Weisser [Thu, 5 Aug 2010 11:17:30 +0000 (13:17 +0200)]
LZMA and LZO causes compile error

If both LZMA and LZO compressions are used there is a compile error
in cmd_bootm.c

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
13 years agoext2fs: Fix optimization bug for doubly-indirect block pointers
Aaron Pace [Mon, 26 Jul 2010 20:24:44 +0000 (14:24 -0600)]
ext2fs: Fix optimization bug for doubly-indirect block pointers

Doubly-indirect block numbers are compared against the first-level
indirect block when checking for a cached copy.  This is causing the
doubly-indirect block to be re-read each time it is accessed.
Repairing this reduces load time for a 70M file from 72 seconds
to 38 seconds.

Signed-off-by: Aaron Pace <Aaron.Pace@alcatel-lucent.com>
13 years agoARM: Define __raw_readX and __raw_writeX
Marek Vasut [Thu, 22 Jul 2010 10:07:19 +0000 (12:07 +0200)]
ARM: Define __raw_readX and __raw_writeX

These functions are undefined on ARM when using __io. These are the commonly
used versions and can be redefined.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoMerge branch 'master' of /home/wd/git/u-boot/master
Wolfgang Denk [Sat, 7 Aug 2010 20:33:06 +0000 (22:33 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/master

13 years agoFix condition where bootm_size not set and wrong memory size reported
Matthew McClintock [Thu, 8 Jul 2010 15:11:08 +0000 (10:11 -0500)]
Fix condition where bootm_size not set and wrong memory size reported

If the user sets bootm_low and does not set bootm_size, u-boot will
report the memory node in the flat device tree incorrectly. Instead
of reporting the remaining size of memory, it will report the total
available memory which is incorrect.

Specifically this fixes the situation when booting a relocatable
kernel and the memory is reported as an offset and size in the
device tree, and the size needs to be adjusted accordingly.

Signed-off-by: Matthew McClintock <msm@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoReplace CHANGELOG files by auto-generated "snapshot.commit"
Wolfgang Denk [Fri, 6 Aug 2010 22:32:50 +0000 (00:32 +0200)]
Replace CHANGELOG files by auto-generated "snapshot.commit"

Idea and implementation courtesy of Kim Phillips <kim.phillips@freescale.com>

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agonet 52xx: fix ethernet device names with spaces
Wolfgang Denk [Thu, 5 Aug 2010 19:31:54 +0000 (21:31 +0200)]
net 52xx: fix ethernet device names with spaces

Some commands (like 'mii') use this name to select devices, but they
break when those names contain spaces. So drop the space from
Ethernet driver names (cf. commit 1384f3bb).

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agoARMV7: Update default environment for OMAP4 boards
Steve Sakoman [Wed, 7 Jul 2010 22:25:25 +0000 (15:25 -0700)]
ARMV7: Update default environment for OMAP4 boards

Specify vram on command line, remove erroneous call to nandboot
in the boot script, add CONFIG_BOOTDELAY

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Nishanth Menon <menon.nishanth@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: Enable musb driver and usbtty on OMAP4 Panda
Steve Sakoman [Fri, 25 Jun 2010 19:52:01 +0000 (12:52 -0700)]
ARMV7: Enable musb driver and usbtty on OMAP4 Panda

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: Enable musb driver and usbtty on OMAP4430 SDP
Steve Sakoman [Fri, 25 Jun 2010 19:44:33 +0000 (12:44 -0700)]
ARMV7: Enable musb driver and usbtty on OMAP4430 SDP

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: Restructure omap3 musb driver to allow code sharing between OMAP3 and OMAP4
Steve Sakoman [Fri, 25 Jun 2010 19:42:04 +0000 (12:42 -0700)]
ARMV7: Restructure omap3 musb driver to allow code sharing between OMAP3 and OMAP4

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: Add support for the TWL6030 I2C power chip used in OMAP4 systems
Steve Sakoman [Thu, 15 Jul 2010 19:53:42 +0000 (12:53 -0700)]
ARMV7: Add support for the TWL6030 I2C power chip used in OMAP4 systems

This patch add the basic infrastructure for the TWL6030 driver and enables
support in the two existing OMAP4 boards, Panda and OMAP4430 SDP

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: Modify i2c driver for more reliable operation on OMAP4
Steve Sakoman [Tue, 20 Jul 2010 03:31:55 +0000 (20:31 -0700)]
ARMV7: Modify i2c driver for more reliable operation on OMAP4

This patch modifies the init routine to follow the TRM
recommendations. It also modifies the i2c_read_byte function
to reflect subtle differences between the i2c controller in
OMAP3 and OMAP4.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Nishanth Menon <menon.nishanth@gmail.com>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: Fix udelay for OMAP4
Steve Sakoman [Tue, 20 Jul 2010 21:56:07 +0000 (14:56 -0700)]
ARMV7: Fix udelay for OMAP4

The OMAP4 x-load code sets gptimer1 clock source to 32Khz.  This isn't
acceptable for udelay.  This patch changes from gptimer1 to gptimer2,
which uses sys_clk at 38.4 Mhz.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoARMV7: Add pad mux support for OMAP4
Steve Sakoman [Thu, 15 Jul 2010 20:43:10 +0000 (13:43 -0700)]
ARMV7: Add pad mux support for OMAP4

Add functional multiplexing support for OMAP4 pads.
Configure all the pads for the OMAP4430 SDP
and OMAP4 Panda boards

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 years agoRename getenv_r() into getenv_f()
Wolfgang Denk [Sat, 24 Jul 2010 19:55:43 +0000 (21:55 +0200)]
Rename getenv_r() into getenv_f()

While running from flash, i. e. before relocation, we have only a
limited C runtime environment without writable data segment. In this
phase, some configurations (for example with environment in EEPROM)
must not use the normal getenv(), but a special function.  This
function had been called getenv_r(), with the idea that the "_r"
suffix would mean the same as in the _r_eentrant versions of some of
the C library functions (for example getdate vs. getdate_r, getgrent
vs. getgrent_r, etc.).

Unfortunately this was a misleading name, as in U-Boot the "_r"
generally means "running from RAM", i. e. _after_ relocation.

To avoid confusion, rename into getenv_f() [as "running from flash"]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agobootm: fix pointer warning with lzma
Mike Frysinger [Sun, 25 Jul 2010 19:54:17 +0000 (15:54 -0400)]
bootm: fix pointer warning with lzma

Avoid warning:
cmd_bootm.c: In function 'bootm_load_os':
cmd_bootm.c:394: warning: passing argument 2 of
'lzmaBuffToBuffDecompress' from incompatible pointer type

For 32 bit systems, this change shouldn't make a difference to code size
since sizeof(size_t) and sizeof(unsigned int) are equal.  But it does fix
the warning.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-samsung
Wolfgang Denk [Tue, 3 Aug 2010 22:35:10 +0000 (00:35 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-samsung

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Tue, 3 Aug 2010 22:30:50 +0000 (00:30 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

13 years agoMerge branch 'master' of /home/wd/git/u-boot/master
Wolfgang Denk [Tue, 3 Aug 2010 20:45:13 +0000 (22:45 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/master

13 years agos5p_goni: enable mmc0
Minkyu Kang [Tue, 6 Jul 2010 11:58:41 +0000 (20:58 +0900)]
s5p_goni: enable mmc0

Adds the board_mmc_init function and enable the mmc command

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
13 years agoS5P: support mmc driver
Minkyu Kang [Tue, 6 Jul 2010 11:26:06 +0000 (20:26 +0900)]
S5P: support mmc driver

This patch adds support mmc driver for s5p SoC

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
13 years agopowerpc/8xxx: query feature reporting register for num cores on unknown cpus
Kim Phillips [Thu, 15 Jul 2010 00:47:29 +0000 (19:47 -0500)]
powerpc/8xxx: query feature reporting register for num cores on unknown cpus

doing so helps avant garde users, such as those using simulators that
allow users to configure the number of cores, so as to not have to
manually adjust u-boot sources.  h/w should also be reliably setting
FRR NCPU in the future.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: configure autocompletion support
Kim Phillips [Thu, 15 Jul 2010 00:47:18 +0000 (19:47 -0500)]
powerpc/85xx: configure autocompletion support

because it's convenient.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p4080: Add support for the P4080DS board
Kumar Gala [Thu, 15 Jul 2010 21:49:03 +0000 (16:49 -0500)]
powerpc/p4080: Add support for the P4080DS board

Add support for the P4080DS board, with the following features:

* 36-bit only
* Boots from NOR flash
* FMAN drivers NOT supported
* SPD DDR initialization

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Lan Chunhe-B25806 <b25806@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoBlackfin: gpio: use common usage func
Mike Frysinger [Fri, 23 Jul 2010 08:24:46 +0000 (04:24 -0400)]
Blackfin: gpio: use common usage func

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agopowerpc/p2020ds: Integrated with P2020DS DDR change and enabled hwconfig
york [Fri, 2 Jul 2010 22:25:58 +0000 (22:25 +0000)]
powerpc/p2020ds: Integrated with P2020DS DDR change and enabled hwconfig

Enabled SPD
Enabled DDR2
Enabled hwconfig

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/8xxx: Improvement to DDR parameters
york [Fri, 2 Jul 2010 22:25:56 +0000 (22:25 +0000)]
powerpc/8xxx: Improvement to DDR parameters

Changes for P2020DS DDR applies to other 8xxx platform

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/8xxx: Enable DDR3 RDIMM support
york [Fri, 2 Jul 2010 22:25:55 +0000 (22:25 +0000)]
powerpc/8xxx: Enable DDR3 RDIMM support

Enabled registered DIMMs using data from SPD. RDIMMs have registers
which need to be configured before using. The register configuration
words are stored in SPD byte 60~116 (JEDEC standard No.21-C). Software
should read those RCWs and put into DDR controller before initialization.

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/8xxx: Enabled address hashing for 85xx
york [Fri, 2 Jul 2010 22:25:54 +0000 (22:25 +0000)]
powerpc/8xxx: Enabled address hashing for 85xx

For 85xx silicon which supports address hashing, it can be activated by
hwconfig.

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/8xxx: Enable quad-rank DIMMs.
york [Fri, 2 Jul 2010 22:25:53 +0000 (22:25 +0000)]
powerpc/8xxx: Enable quad-rank DIMMs.

Previous code presumes each DIMM has up to two rank (chip select). Newer
DDR controller supports up to four chip select on one DIMM.

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/8xxx: Fix bug in memctrl interleaving & bank interleaving on cs0~cs4
york [Fri, 2 Jul 2010 22:25:52 +0000 (22:25 +0000)]
powerpc/8xxx: Fix bug in memctrl interleaving & bank interleaving on cs0~cs4

Verified on MPC8641HPCN with four DDR2 dimms. Each dimm has dual
rank with 512MB each rank.

Also check dimm size and rank size for memory controller interleaving

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/8xxx: Enabled hwconfig for memory interleaving
Kumar Gala [Wed, 14 Jul 2010 15:04:21 +0000 (10:04 -0500)]
powerpc/8xxx: Enabled hwconfig for memory interleaving

Replace environmental variables memctl_intlv_ctl and ba_intlv_ctl with
hwconfig parameters. The syntax is

    setenv hwconfig "fsl_ddr:ctlr_intlv=<mode>,bank_intlv=<mode>"

The mode values for memory controller interleaving are
    cacheline
    page
    bank
    superbank

The mode values for bank interleaving are
    cs0_cs1
    cs2_cs3
    cs0_cs1_and_cs2_cs3
    cs0_cs1_cs2_cs3

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/p4080: Add workaround for erratum CPU22
Kumar Gala [Thu, 6 May 2010 03:35:27 +0000 (22:35 -0500)]
powerpc/p4080: Add workaround for erratum CPU22

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p4080: Add workaround for errata SERDES8
Kumar Gala [Tue, 13 Jul 2010 05:39:46 +0000 (00:39 -0500)]
powerpc/p4080: Add workaround for errata SERDES8

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p4080: Add support for initializing SERDES
Kumar Gala [Tue, 13 Jul 2010 03:51:29 +0000 (22:51 -0500)]
powerpc/p4080: Add support for initializing SERDES

Add support for initializing the SERDES blocks on CoreNet style QoriQ
devices and the p4080 specific SERDES tables to know which actual
componetns are enabled.

Additionally, split out the Frame Manger (FMAN) into its specific ethernet
ports instead of gross level of the full FMAN.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Add support to initialize LIODN registers and portals
Kumar Gala [Thu, 10 Sep 2009 08:02:13 +0000 (03:02 -0500)]
powerpc/85xx: Add support to initialize LIODN registers and portals

On the new QorIQ/CoreNet based platforms we need to initialize the
"portals" as access into the Data Path subystem as well as Logical IO
Device Numbers (LIODN) that are used for the IOMMU (PAMU).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agofdt: Add function to alloc phandle values
Kumar Gala [Fri, 9 Jul 2010 21:18:58 +0000 (16:18 -0500)]
fdt: Add function to alloc phandle values

If we are creating reference (handles) to nodes in a device tree we need
to first create a new phandle in node and this needs a new phandle
value.  So we search through the whole dtb to find the max phandle value
and return the next greater value for a new phandle allocation.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
13 years agopowerpc/p4080: Add support for CPC(Corenet platform cache) on CoreNet platforms
Kumar Gala [Thu, 19 Mar 2009 08:40:08 +0000 (03:40 -0500)]
powerpc/p4080: Add support for CPC(Corenet platform cache) on CoreNet platforms

The CoreNet style platforms can have a L3 cache that fronts the memory
controllers.  Enable that cache as well as add information into the
device tree about it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p2020: Move INIT_RAM_ADDR physical address higher for 36-bit for P2020DS
york [Fri, 2 Jul 2010 22:26:03 +0000 (22:26 +0000)]
powerpc/p2020: Move INIT_RAM_ADDR physical address higher for 36-bit for P2020DS

If 36-bit is enabled, move INIT_RAM_ADDR physical address higher
to free lowest 4GB address space.

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/85xx: Move INIT_RAM_ADDR physical address to 36-bit space
york [Fri, 2 Jul 2010 22:25:57 +0000 (22:25 +0000)]
powerpc/85xx: Move INIT_RAM_ADDR physical address to 36-bit space

If 36-bit physical address is used, move the INIT_RAM_ADDR to higher
address. This frees the low 4GB address space for better use.

Signed-off-by: York Sun <yorksun@freescale.com>
13 years agopowerpc/fsl_fman: Add initial fman immap structures
Kumar Gala [Sat, 3 Jul 2010 17:56:51 +0000 (12:56 -0500)]
powerpc/fsl_fman: Add initial fman immap structures

Add basic structures for Frame Manager on P4080/P3041/P5020 devices

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Add additional p4080 platform related defines/structs
Kumar Gala [Wed, 28 Apr 2010 09:02:21 +0000 (04:02 -0500)]
powerpc/85xx: Add additional p4080 platform related defines/structs

* Added PCIE4 address, offset, DEVDISR & LAW target ID
* Added new p4080 DDR registers and defines to immap
* Add missing corenet platform DEVDISR related defines
* Updated ccsr_gur to include LIODN registers
* Add RCWSR defines
* Added Basic qman, pme, bman immap structs
* Added SATA related offsets & addresses
* Added Frame Manager 1/2 offsets & addresses
* Renamed CONFIG_SYS_TSEC1_OFFSET to CONFIG_SYS_FSL_FM1_DTSEC1_OFFSET
* Added various offsets and addresses that where missing

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoBlackfin: jtag-console: handle newline stuffing
Mike Frysinger [Fri, 23 Jul 2010 20:51:49 +0000 (16:51 -0400)]
Blackfin: jtag-console: handle newline stuffing

Serial devices currently have to manually stuff \r after every \n found,
but this is a bit more difficult with the jtag console since we process
everything in chunks of 4 bit.  So we have to scan & stuff the whole
string rather than what most serial drivers do which is output on a byte
per byte basis.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: jtag-console: add debug markers
Mike Frysinger [Fri, 23 Jul 2010 15:34:49 +0000 (11:34 -0400)]
Blackfin: jtag-console: add debug markers

While we're in here, add some useful debug points.  We need custom debug
statements because we need the output to only go to the serial port.  If
we used the standard debug helpers, the output would also go to the stdout
(which would be the jtag console) and make it hard to figure out what is
going where exactly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: jtag-console: robustify against missing peer
Mike Frysinger [Fri, 23 Jul 2010 15:34:49 +0000 (11:34 -0400)]
Blackfin: jtag-console: robustify against missing peer

If the other side isn't listening, we should reset the state to ignore
the whole message and not just the part we missed.  This makes it easier
to connect at any time to the jtag console without worrying about the two
sides getting out of sync and thus sending garbage back and forth.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: jtagconsole: disable output processing
Mike Frysinger [Fri, 23 Jul 2010 15:27:51 +0000 (11:27 -0400)]
Blackfin: jtagconsole: disable output processing

Avoid extra carriage returns in the output by disabling output processing.
Otherwise, whenever the remote sends a \r\n, we end up with \r\r\n.

Reported-by: Vivi Li <vivi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf533/bf561 boards: convert to new soft gpio i2c code
Mike Frysinger [Tue, 8 Jun 2010 20:22:44 +0000 (16:22 -0400)]
Blackfin: bf533/bf561 boards: convert to new soft gpio i2c code

Use the new common gpio framework to simplify and unify the soft i2c
configuration settings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Heiko Schocher <hs@denx.de>
13 years agofs/fat: Big code cleanup.
Wolfgang Denk [Mon, 19 Jul 2010 09:37:00 +0000 (11:37 +0200)]
fs/fat: Big code cleanup.

- reformat
- throw out macros like FAT_DPRINT and FAT_DPRINT
- remove dead code

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agousb_storage.c: change progress output in debug() message
Wolfgang Denk [Mon, 19 Jul 2010 09:36:59 +0000 (11:36 +0200)]
usb_storage.c: change progress output in debug() message

The dots printed by common/usb_storage.c as progress meter corrupt the
output for example of "fatls usb" commands like this:

=> fatls usb 0
. <<==== here
       29   file.001
       29   file.002
       29   file.003
       29   file.004
       29   file.005
       29   file.006
       29   file.007
       29   file.008
       29   file.009
       29   file.010
       29   file.011
       29   file.012
       29   file.013
       29   file.014
       29   file.015
       29   file.016
. <<==== here
       29   file.017
       29   file.018
       29   file.019
...

Turn the progress output into a debug message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agoFAT32: fix broken root directory handling.
Wolfgang Denk [Mon, 19 Jul 2010 09:36:58 +0000 (11:36 +0200)]
FAT32: fix broken root directory handling.

On FAT32, instead of fetching the cluster numbers from the FAT, the
code assumed (incorrectly) that the clusters for the root directory
were allocated contiguously. In the result, only the first cluster
could be accessed. At the typical cluster size of 8 sectors this
caused all accesses to files after the first 128 entries to fail -
"fatls" would terminate after 128 files (usually displaying a bogus
file name, occasionally even crashing the system), and "fatload"
would fail to find any files that were not in the first directory
cluster.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoFAT32: fix support for superfloppy-format (PBR)
Wolfgang Denk [Mon, 19 Jul 2010 09:36:57 +0000 (11:36 +0200)]
FAT32: fix support for superfloppy-format (PBR)

"Superfloppy" format (in U-Boot called PBR) did not work for FAT32 as
the file system type string is at a different location. Add support
for FAT32.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agousb_storage.c: initialize device type
Wolfgang Denk [Mon, 19 Jul 2010 09:36:56 +0000 (11:36 +0200)]
usb_storage.c: initialize device type

The device type was left uninitialized which caused later tests
against DEV_TYPE_UNKNOWN to fail. In the result, "usb part" would
attempt to print information about non-existent devices like this:

=> usb part
print_part of 0

Partition Map for USB device 0  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1                    0         2031616      f8

print_part of 1
## Unknown partition table

print_part of 2
## Unknown partition table

print_part of 3
## Unknown partition table

print_part of 4
## Unknown partition table
=>

By initializing the type as DEV_TYPE_UNKNOWN we avoid all the
"Unknown partition table" messages.

[Note: the "print_part of ?" messages is left over debug code that
will be removed in another patch.]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
13 years agocmd_usage(): simplify return code handling
Wolfgang Denk [Fri, 16 Jul 2010 23:06:04 +0000 (01:06 +0200)]
cmd_usage(): simplify return code handling

Lots of code use this construct:

cmd_usage(cmdtp);
return 1;

Change cmd_usage() let it return 1 - then we can replace all these
ocurrances by

return cmd_usage(cmdtp);

This fixes a few places with incorrect return code handling, too.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoMerge branch 'master' of /home/wd/git/u-boot/custodians
Wolfgang Denk [Sat, 24 Jul 2010 18:41:34 +0000 (20:41 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/custodians

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Sat, 24 Jul 2010 18:41:28 +0000 (20:41 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

13 years agoMerge branch 'master' of /home/wd/git/u-boot/custodians
Wolfgang Denk [Sat, 24 Jul 2010 18:34:29 +0000 (20:34 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/custodians

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Sat, 24 Jul 2010 18:34:13 +0000 (20:34 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

13 years agoppc4xx: Enable "ecctest" command on t3corp
Stefan Roese [Thu, 22 Jul 2010 17:06:27 +0000 (19:06 +0200)]
ppc4xx: Enable "ecctest" command on t3corp

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Enable "ecctest" command on katmai
Stefan Roese [Thu, 22 Jul 2010 17:06:14 +0000 (19:06 +0200)]
ppc4xx: Enable "ecctest" command on katmai

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Add ECC status info to machine-check exception for IBM DDR2 core
Stefan Roese [Wed, 21 Jul 2010 17:06:26 +0000 (19:06 +0200)]
ppc4xx: Add ECC status info to machine-check exception for IBM DDR2 core

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Add "ecctest" command to test/simulate ECC errors
Stefan Roese [Wed, 21 Jul 2010 17:06:10 +0000 (19:06 +0200)]
ppc4xx: Add "ecctest" command to test/simulate ECC errors

This patch adds the "ecctest" command to test and simulate ECC errors
(single bit and/or double bit) while running from SDRAM. Currently only
the IBM DDR2 controller is supported (405EX, 440SP(e), 460EX/GT).

This is done by copying and calling functions, modifying the SDRAM
controller operation mode, in internal SRAM/OCM.

For correctable ECC errors (single bit) only the status will be printed
since the DDR2 controller doesn't provide the faulting address:

=> ecctest 1000000 1
Using address 01000000 for 1 bit ECC error injection
ECC: Correctable error

Uncorrectable ECC errors (double bit) will also display the faulting
address:

=> ecctest 1000000 2
Using address 01000000 for 2 bit ECC error injection
ECC: Uncorrectable error at 0x0001000000

To enable this "ecctest" function you need to define CONFIG_CMD_ECCTEST
in the board config header.

Tested on katmai and t3corp.

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: DDR/ECC: Use correct macros to clear error status
Stefan Roese [Wed, 21 Jul 2010 09:08:27 +0000 (11:08 +0200)]
ppc4xx: DDR/ECC: Use correct macros to clear error status

Use the correct macro instead of the hardcoded 0x4c to clear the ECC
status in the 440/460 DDR(2) error status register after ECC
initialization.

Also the non-440 parts (405EX(r) right now) and the IBM DDR PPC variants
(440GX) use a different registers to clear this error status. Use the
correct ones.

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Only define DDR2 registers for the correct PowerPC variants
Stefan Roese [Wed, 21 Jul 2010 09:08:16 +0000 (11:08 +0200)]
ppc4xx: Only define DDR2 registers for the correct PowerPC variants

Make sure that some SDRAM/DDR2 registers are only defined for the PPC
variants really implementing those registers.

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Add CONFIG_DDR_RFDC_FIXED to allow board specific RFDC values
Stefan Roese [Tue, 20 Jul 2010 05:06:03 +0000 (07:06 +0200)]
ppc4xx: Add CONFIG_DDR_RFDC_FIXED to allow board specific RFDC values

Using this define, a board can define an opimized RFDC value and use
the auto calibration code to "tune" the remaining DDR2 controller
calibration register.

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: T3CORP fixes and updates
Stefan Roese [Mon, 19 Jul 2010 12:24:22 +0000 (14:24 +0200)]
ppc4xx: T3CORP fixes and updates

This patch fixes some problems for the T3CORP board. Here the list
of the changes:

- Add 600-67 and 677 CPU frequency setting to chip_config
  command
- Define CONFIG_DDR_RFDC_FIXED on t3corp:
  While using the "normal" auto calibration code, sometimes values for
  RFDC were picked (>= T3) that resulted in a non-working U-Boot (hang
  upon relocation, while running from SDRAM). With this optimized RFDC
  value we can force this register and use the auto-calibration code to
  setup the remaining calibration registers.
- Increase sizes of FPGA chips selects
- EBC timing updated OEN=3 for 66 MHz EBC speed
- Change ext. IRQ2 setup to level-low active
- Enable CONFIG_SYS_CFI_FLASH_STATUS_POLL

By defining CONFIG_SYS_CFI_FLASH_STATUS_POLL, DQ7 is polled to detect the
chip busy status. This is now used instead of the data toggle method which
is used historically by default in the common CFI driver. With this change
a problem with not written data is solved on this board, where a 32 byte
block of data is still erased instead of filled with the correct content
after these commands:

=> erase 0xfc100000 +0x1000000

....................................................................
done
Erased 128 sectors
=> cp.b 0x100000 0xfc100000 0x1000000
Copy to Flash... done
=> cmp.b 0x100000 0xfc100000 0x1000000
byte at 0x00d0d6c0 (0x00) != byte at 0xfcd0d6c0 (0xff)
Total of 12637888 bytes were the same

Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx/Canyonlands added USB board callbacks
Rupjyoti Sarmah [Wed, 7 Jul 2010 12:44:48 +0000 (18:14 +0530)]
ppc4xx/Canyonlands added USB board callbacks

Functions added to support board callbacks for USB init. This
isolates USB manipulations such that it is only touched if USB is
used by U-Boot.

Signed-off-by: Dave Mitchell <dmitchell@appliedmicro.com>
Signed-off-by: Rupjyoti Sarmah <rsarmah@appliedmicro.com>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoi2c: soft_i2c: add simple GPIO implementation
Mike Frysinger [Wed, 21 Jul 2010 17:38:02 +0000 (13:38 -0400)]
i2c: soft_i2c: add simple GPIO implementation

Since the vast majority of GPIO I2C implementations behave the same way,
support the common GPIO framework with default settings.

This adds two new defines CONFIG_SOFT_I2C_GPIO_{SCL,SDA} so that boards
which want GPIO I2C support need only define these.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Thomas Chou <thomas@wytron.com.tw>
13 years agoMerge branch 'master' of /home/wd/git/u-boot/master/
Wolfgang Denk [Wed, 21 Jul 2010 20:23:26 +0000 (22:23 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/master/

13 years agopowerpc/85xx: Rework P1022 SERDES is_serdes_configured support
Kumar Gala [Sun, 11 Jul 2010 17:41:46 +0000 (12:41 -0500)]
powerpc/85xx: Rework P1022 SERDES is_serdes_configured support

Move serdes init until after we are in ram so we can keep track of a
global static protocal map for the particular serdes config we are in.
This makes is_serdes_configured() much simplier and not constantly
reading registers to determine if a given device is enabled based on the
protocol.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Rework MPC8536 SERDES is_serdes_configured support
Kumar Gala [Sat, 22 May 2010 18:21:39 +0000 (13:21 -0500)]
powerpc/85xx: Rework MPC8536 SERDES is_serdes_configured support

Move serdes init until after we are in ram so we can keep track of a
global static protocal map for the particular serdes config we are in.
This makes is_serdes_configured() much simplier and not constantly
reading registers to determine if a given device is enabled based on the
protocol.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p3041: Add various p3041 related defines
Kumar Gala [Wed, 27 Jan 2010 16:26:46 +0000 (10:26 -0600)]
powerpc/p3041: Add various p3041 related defines

There are various locations that we have chip specific info:

* Makefile for which ddr code to build
* Added p3041 to cpu_type_list and SVR list
* Added number of LAWs for p3041
* Set CONFIG_MAX_CPUS to 4 for p3041

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p5020: Add various p5020 related defines (and p5010)
Kumar Gala [Wed, 21 Oct 2009 18:32:58 +0000 (13:32 -0500)]
powerpc/p5020: Add various p5020 related defines (and p5010)

There are various locations that we have chip specific info:

* Makefile for which ddr code to build
* Added p5020 & p5010 to cpu_type_list and SVR list
* Added number of LAWs for p5020
* Set CONFIG_MAX_CPUS to 2 for p5020

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/mpc85xx: Report FMAN # to match user manual
Emil Medve [Thu, 17 Jun 2010 05:08:29 +0000 (00:08 -0500)]
powerpc/mpc85xx: Report FMAN # to match user manual

The user manual refers to FMAN1 and FMAN2 not 0 and 1.

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p4080: Add setting of clock-frequency for clockgen node
Kumar Gala [Sat, 10 Jul 2010 11:55:41 +0000 (06:55 -0500)]
powerpc/p4080: Add setting of clock-frequency for clockgen node

On QorIQ CoreNet based devices we have a global clocking block.  We want
to keep track of SYSCLK frequency as it is what is used to derive all
other frequencies in the SoC

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Use fdt_node_offset_by_compat_reg for clock-frequency updates
Kumar Gala [Sat, 10 Jul 2010 11:38:16 +0000 (06:38 -0500)]
powerpc/85xx: Use fdt_node_offset_by_compat_reg for clock-frequency updates

Move to using fdt_node_offset_by_compat_reg to find the node offsets we
want to update instead of using aliases.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx & 86xx: Rework ft_fsl_pci_setup to not require aliases
Kumar Gala [Fri, 9 Jul 2010 03:37:44 +0000 (22:37 -0500)]
powerpc/85xx & 86xx: Rework ft_fsl_pci_setup to not require aliases

Previously we used an alias the pci node to determine which node to
fixup or delete.  Now we use the new fdt_node_offset_by_compat_reg to
find the node to update.

Additionally, we replace the code in each board with a single macro call
that makes assumes uniform naming and reduces duplication in this area.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agofdt: Add fdt_node_offset_by_compat_reg helper
Kumar Gala [Sun, 4 Jul 2010 17:48:21 +0000 (12:48 -0500)]
fdt: Add fdt_node_offset_by_compat_reg helper

Given a compatible string and physical address try and find a node that
matches.  This is useful when we want to find a specific device node to
update (for example if we have multiple PCI nodes we can use the
physical address to distinguish them when trying to update the device
tree).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
13 years agofdt: Add fdt_translate_address to convert reg node to cpu phys addr
Kumar Gala [Wed, 16 Jun 2010 19:27:38 +0000 (14:27 -0500)]
fdt: Add fdt_translate_address to convert reg node to cpu phys addr

This code is extracted out of the Linux Kernel code from
arch/powerpc/kernel/prom_parse.c.

We maintain some of the same structure to support multiple bus types even
though we only have one in the current code.  In the future we might want
to translate across a PCI bus and thus it will be easier to add that
functionality back in.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>