Commit Graph

14833 Commits

Author SHA1 Message Date
Wolfgang Denk
e4ed004b65 Merge branch 'master' of /home/wd/git/u-boot/custodians
* 'master' of /home/wd/git/u-boot/custodians:
  Tegra2: mmc: Factor out mmc_wait_inhibit functionality
  Tegra2: mmc: Add data transfer completion timeout
  Tegra2: mmc: Support DMA restarts at buffer boundaries
  Tegra2: mmc: define register field values in tegra2_mmc.h
  MMC: PL180: Fix infinite loop with VExpress extended fifo implementation
2011-11-16 19:53:37 +01:00
Che-Liang Chiou
a2a5729fc1 api: export LCD device to external apps
This patch exports LCD info-query and bitmap-rendering functions to
external apps.

This patch is tested on a Seaboard.  Because the LCD driver is not yet
upstreamed, the test was done in a local downstream repo.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
2011-11-15 23:58:27 +01:00
Che-Liang Chiou
d3983ee853 font: split font data from video_font.h
While video_font.h is useful even without referencing the font data, it
is not possible to be included multiple times because it defines font
data array right in the header.

This patch splits the font data array into video_font_data.h and so now
video_font.h can be included multiple times.  This at least solves the
code duplication in board/mcc200/lcd.c.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-15 23:58:26 +01:00
Che-Liang Chiou
c270730f58 tools: logo: split bmp arrays from bmp_logo.h
The generated header bmp_logo.h is useful even outside common/lcd.c for
the logo dimension.  However, the problem is, the generated bmp_logo.h
cannot be included multiple times because bmp_logo_palette[] and
bmp_logo_bitmap[] are defined in the bmp_logo.h.

This patch fixes this by defining these arrays in another header
bmp_logo_data.h and in bmp_logo.h only declaring these arrays.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-15 23:58:26 +01:00
Che-Liang Chiou
02110903a8 lcd: add clear and draw bitmap declaration
The functions for clearing and drawing bitmaps on the screen were not
exposed publicly and are made public in this patch in preparation for
implementing the display interface of api_public.h.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-15 23:58:26 +01:00
Heiko Schocher
75acc4d7c1 arm, davinci: add DAVINCI_MMC_CLKID
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:51 +01:00
Heiko Schocher
dc02badab4 arm, davinci_emac: fix driver bug if more then 3 PHYs are detected
since commits:
davinci: emac: add support for more than 1 PHYs
062fe7d332

davinci: remove obsolete macro CONFIG_EMAC_MDIO_PHY_NUM
fb1d6332b5

I get following warning on the enbw_cmc board:

Err:   serial
Net:    5 ETH PHY detected
miiphy_register: non unique device name 'KSZ8873 @ 0x01'
DaVinci-EMAC
Hit any key to stop autoboot:  0

Also I see some debug printfs:

=> run load
+ emac_close
+ emac_ch_teardown
- emac_ch_teardown
+ emac_ch_teardown
- emac_ch_teardown
- emac_close
+ emac_open
- emac_open
Using DaVinci-EMAC device

reason is 062fe7d332 new define MAX_PHY.
This is set to 3! I get on this board 5 active phys, so
this leads in wrong memory writes ...

so I changed:

- define CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT to set
  the MAX_PHY value, add a description in README
  for the new CONFIG_SYS option.
- print an error message if more then MAX_PHYs are
  detected.
- fill the active_phy_addr array in a for loop with
  0xff
- changed printf() in debug_emac()

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Tom Rini <tom.rini@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:51 +01:00
Heiko Schocher
f3c149d6c6 arm, davinci: da850/dm365 lowlevel cleanup
- Cleanup a lot of fix values, and use defines instead.
- Also make some values configurable through the board config
  file.
- delete the NAND_SPL code for da850, as it is not used actually
- remove the asm code

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Tom Rini <tom.rini@gmail.com>
Cc: Christian Riesch <christian.riesch@omicron.at>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:51 +01:00
Sricharan
a9c1c04243 omap5: Add omap5_evm board build support.
This patch adds the build support for the
omap5_evm board.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:50 +01:00
Sricharan
78f455c055 omap4/5: Add support for booting with CH.
Configuration header(CH) is 512 byte header attached to an OMAP
boot image that will help ROM code to initialize clocks, SDRAM
etc and copy U-Boot directly into SDRAM. CH can help us in
by-passing SPL and directly boot U-boot, hence it's an alternative
for SPL. However, we intend to support both CH and SPL for OMAP4/5.

Initialization done through CH is limited and is not equivalent
to that done by SPL. So U-Boot has to distinguish between the
two cases and handle them accordingly. This patch takes care
of doing this.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:50 +01:00
Sricharan
bb772a5944 omap5: emif: Add emif/ddr configurations required for omap5 evm
Add the emif configurations required for omap5 soc.Add the
correct ddr part configurations required for omap5 evm board.
EDB8164B3PH from ELPIDA is the part used on the board.

Also changes are done to retain some part of the code
common for OMAP4/5 and keep only the remaining in the Soc
specific directories.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:50 +01:00
Sricharan
2e5ba48928 omap5: clocks: Add clocks support for omap5 platform.
Adding the correct configurations required for
dplls, clocks, for omap5 Soc.

Also changes are done to retain some part of the code common
for OMAP4/5 and move only the remaining to the Soc specific
directories.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:50 +01:00
Sricharan
508a58fa8e omap5: Add minimal support for omap5430.
This patch adds the minimal support for OMAP5. The platform and machine
specific headers and sources updated for OMAP5430.

OMAP5430 is Texas Instrument's SOC based on ARM Cortex-A15 SMP architecture.
It's a dual core SOC with GIC used for interrupt handling and SCU for cache
coherency.

Also moved some part of code from the basic platform support that can be made
common for OMAP4/5. Rest is kept out seperately. The same approach is followed
for clocks and emif support in the subsequent patches.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:50 +01:00
Sricharan
933efe641a omap: Checkpatch fixes
Fixing them here so that when the files are reused in
subsequent patches for omap5, avoids new checkpatch
warnings.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:50 +01:00
Sricharan
ce170beeb7 omap4: make omap4 code common for future reuse
Much of omap4 soc support code can be reused for omap5.
Move them to the omap-common directory to facilitate
this.

Signed-off-by: sricharan <r.sricharan@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-15 22:25:50 +01:00
Marek Vasut
24ccca5eb9 GCC4.6: Squash warnings in onenand_base.c
onenand_base.c: In function ‘onenand_do_lock_cmd’:
onenand_base.c:1946:6: warning: variable ‘wp_status_mask’ set but not used
[-Wunused-but-set-variable]
onenand_base.c: In function ‘onenand_check_maf’:
onenand_base.c:2229:8: warning: variable ‘name’ set but not used
[-Wunused-but-set-variable]
onenand_base.c: In function ‘flexonenand_get_boundary’:
onenand_base.c:2258:6: warning: variable ‘ret’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
2011-11-15 22:24:50 +01:00
Marek Vasut
5e8baf878e GCC4.6: Fix common/usb.c on xscale
The problem was that the code, when the function was compiled with -Os, was
misgenerated. As in the function description, this is likely another
manifestation of the bug in GCC.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
2011-11-15 22:24:50 +01:00
Marek Vasut
54cd51bf79 OneNAND: Add simple OneNAND SPL
This introduces small OneNAND loader, fitting into 1kB of space (smallest
possible OneNAND RAM size). Some devices equipped with such crappy chips will
use this.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Scott Wood <scottwood@freescale.com>

V2: Introduce spl_onenand_load_image() to load data from OneNAND in SPL
V3: Cleanup, align with nand_spl. Skip whole blocks.
2011-11-15 22:24:50 +01:00
Marek Vasut
5d877f4212 PXA: vpac270: Enable the new generic MMC driver
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-15 22:24:50 +01:00
Marek Vasut
237ce0fe97 PXA: Cleanup serial_pxa
* Cleanup register definitions by introducing new regs-uart.h, compliant with
  rest of U-Boot.
* Remove old register definitions from pxa-regs.h
* Convert serial_pxa to new regs-uart.h
* Cleanup serial_pxa

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-15 22:24:50 +01:00
Marek Vasut
dd36d806fe PXA: Drop csb226 and innokom boards (unmaintained)
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Robert Schwebel <robert@schwebel.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-11-15 22:24:50 +01:00
Gabe Black
07e1278496 Fix constness of the fdt void pointer in fdt_getprop_u32_default
The function fdt_getprop_u32_default doesn't modify the fdt, so it can use a
const void * for its fdt argument.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-13 11:21:34 -05:00
Gabe Black
de16606ae3 Add some missing endian conversions in fdt_support.c
Some functions in fdt_support.c use fdt_getprop to read 32 bit values out of
the device tree, but then use them directly without doing any endian
conversion. Because they check for a value that doesn't actually appear in
practice, the functions continued to work even though they're incorrect.
This change adds the missing conversions.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-13 11:21:34 -05:00
Anton staaf
0963ff3a97 Tegra2: mmc: Factor out mmc_wait_inhibit functionality
This is a well encapsulated section of mmc_send_cmd, by moving
it to it's own function it increases the readability of mmc_send_cmd.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
2011-11-12 15:39:29 -06:00
Anton staaf
9b3d1873c8 Tegra2: mmc: Add data transfer completion timeout
Currently when no expected completion condition occures in the
mmc_send_cmd while loop that is waiting for a data transfer to
complete the MMC driver just hangs.

This patch adds an arbitrary 2 second timeout.  If nothing we
recognize occures within 2 seconds some diagnostic information
is printed and we fail out.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
2011-11-12 15:39:29 -06:00
Anton staaf
5a762e2509 Tegra2: mmc: Support DMA restarts at buffer boundaries
Currently if a DMA buffer straddles a buffer alignment boundary
(512KiB) then the DMA engine will pause and generate a DMA
interrupt.  Since the DMA interrupt is not enabled it will hang
the MMC driver.

This patch adds support for restarting the DMA transfer.  The
SYSTEM_ADDRESS register contains the next address that would have
been read/written when a boundary is hit.  So we can read that
and write it back.  The write triggers the resumption of the
transfer.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
2011-11-12 15:39:29 -06:00
Anton staaf
8e42f0d62b Tegra2: mmc: define register field values in tegra2_mmc.h
This moves the magic numbers sprinkled about the MMC driver
to a single location in the header file and gives them
meaningful names.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
2011-11-12 15:39:29 -06:00
Kumar Gala
4589728e21 powerpc/85xx: Fix builds of P1020/P2020RDB-PC_36BIT_NAND
Size grew a bit so nand-spl didn't fit in 4k, reduce done by removing
LAW entries not needed during SPL phase.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 08:14:53 -06:00
Kumar Gala
dea7f88726 arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c: Fix GCC 4.6 build warning
Fix:

ctrl_regs.c: In function 'set_ddr_sdram_cfg_2':
ctrl_regs.c:641:15: warning: variable 'rcw_en' set but not used [-Wunused-but-set-variable]
ctrl_regs.c: In function 'compute_fsl_memctl_config_regs':
ctrl_regs.c:951:31: warning: array subscript is above array bounds [-Warray-bounds]
ctrl_regs.c:752:34: warning: array subscript is above array bounds [-Warray-bounds]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:01 -06:00
Kumar Gala
c1ee16b8e0 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c: Fix GCC 4.6 build warning
Fix:

fsl_corenet_serdes.c: In function 'fsl_serdes_init':
fsl_corenet_serdes.c:511:8: warning: variable 'buf' set but not used [-Wunused-but-set-variable]
fsl_corenet_serdes.c:498:18: warning: variable 'lane_prtcl' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:01 -06:00
Kumar Gala
667bc17e07 arch/powerpc/cpu/mpc8xxx/ddr/options.c: Fix GCC 4.6 build warning
Fix:

options.c: In function 'populate_memctl_options':
options.c:486:28: warning: variable 'pdodt' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:01 -06:00
Kumar Gala
9cc971b90f drivers/qe/uec.c: Fix GCC 4.6 build warning
uec.c: In function 'uec_stop':
uec.c:267:22: warning: variable 'uccf' set but not used [-Wunused-but-set-variable]
uec.c: In function 'uec_set_mac_if_mode':
uec.c:328:15: warning: variable 'uec_info' set but not used [-Wunused-but-set-variable]
uec.c: In function 'adjust_link':
uec.c:519:11: warning: variable 'uec_regs' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:01 -06:00
Kumar Gala
dd22f7cf2c drivers/usb/host/ehci-fsl.c: Fix GCC 4.6 build warning
Fix:

ehci-fsl.c: In function 'ehci_hcd_init':
ehci-fsl.c:43:7: warning: variable 'usb_phy' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:01 -06:00
Kumar Gala
9ccfed20da drivers/net/fm/fm.c: Fix GCC 4.6 build warning
Fix:

fm.c: In function 'fm_init_common':
fm.c:398:6: warning: variable 'n' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:01 -06:00
Kumar Gala
ebba0d4bc5 board/sbc8560/sbc8560.c: Fix GCC 4.6 build warning
Fix:

sbc8560.c: In function 'ft_board_setup':
sbc8560.c:351:12: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:00 -06:00
Kumar Gala
dbe128a9bd board/sbc8548/sbc8548.c: Fix GCC 4.6 build warning
Fix:

sbc8548.c: In function 'local_bus_init':
sbc8548.c:80:7: warning: variable 'lbc_hz' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:00 -06:00
Kumar Gala
e3779209dd board/freescale/mpc8569mds/mpc8569mds.c: Fix GCC 4.6 build warning
mpc8569mds.c: In function 'local_bus_init':
mpc8569mds.c:306:7: warning: variable 'lbc_hz' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:00 -06:00
Kumar Gala
502dd36b78 board/freescale/mpc8568mds/mpc8568mds.c: Fix GCC 4.6 build warning
Fix:

mpc8568mds.c: In function 'local_bus_init':
mpc8568mds.c:150:7: warning: variable 'lbc_hz' set but not used [-Wunused-but-set-variable]
mpc8568mds.c: In function 'pib_init':
mpc8568mds.c:271:11: warning: variable 'orig_i2c_bus' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:00 -06:00
Kumar Gala
945f43101e board/freescale/mpc8548cds/mpc8548cds.c: Fix GCC 4.6 build warning
Fix:

mpc8548cds.c: In function 'local_bus_init':
mpc8548cds.c:87:7: warning: variable 'lbc_hz' set but not used [-Wunused-but-set-variable]
mpc8548cds.c: In function 'lbc_sdram_init':
mpc8548cds.c:121:7: warning: variable 'cpu_board_rev' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:49:00 -06:00
Kumar Gala
8dbd4b746d board/freescale/common/pixis.c: Fix GCC 4.6 build warning
Fix:

pixis.c: In function 'strfractoint':
pixis.c:383:6: warning: variable 'intarr_len' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:59 -06:00
Kumar Gala
67926c2a1d board/freescale/common/cds_pci_ft.c: Fix GCC 4.6 build warning
Fix:

cds_pci_ft.c: In function 'cds_pci_fixup':
cds_pci_ft.c:31:12: warning: variable 'tmp' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:59 -06:00
Kumar Gala
e55d637a5f arch/powerpc/cpu/mpc8xxx/fsl_lbc.c: Fix GCC 4.6 build warning
Fix:

fsl_lbc.c: In function 'upmconfig':
fsl_lbc.c:110:9: warning: variable 'mdr' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:59 -06:00
Kumar Gala
3d6d9c3116 arch/powerpc/cpu/mpc85xx/tlb.c: Fix GCC 4.6 build warning
Fix:

tlb.c: In function 'disable_tlb':
tlb.c:175:34: warning: variable '_mas7' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:59 -06:00
Kumar Gala
e4c9a35d21 arch/powerpc/cpu/mpc85xx/cpu_init.c: Fix GCC 4.6 build warning
Fix:

cpu_init.c: In function 'cpu_init_r':
cpu_init.c:320:7: warning: variable 'l2srbar' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:59 -06:00
Xie Xiaobo
c27ff9b623 phylib: Enable AR8021 phy support
Enable AR8021 as it used on Freescale boards: P1020RDB-PC, P1021RDB-PC,
P2020RDB-PC, P1020UTM-PC, and P1020MSBG-PC.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:59 -06:00
Jerry Huang
07b5edc206 powerpc/85xx: Set max alloc length to 10MB on P1022DS
In order to support 1920x01080 resolution, we must increase the alloc
length.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
CC: Anatolij Gustschin <agust@denx.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:58 -06:00
Jerry Huang
71775d3b54 powerpc/mpc85xx: Set SYSCLK to the required frequency
For ICS307-02, there is one general expression to generate SYSCLK:
CLK1Frequency = InputFrequency * 2 * (VDW + 8) / ((RDW + 2) * OD)

If we want the required frequency for SYSCLK, we must find one solution
to generate this frequency, this solution includes VDW, RDW and OD.
For OD, there are only eight option value: 10, 2, 8, 4, 5, 7, 3, 6.
For RDW, the range is 1 to 127.
For VDW, the range is 4 to 511.

First, we use one OD, RDW and required SYSCLK to calculate the VDW,
if VDW is in it's range, we will calculate the CLK1Frequency with
the OD, RDW and VDW calculated, and we will check this percent
(CLK1Frequency / required SYSCLK), and the precision is 1/1000.
if the percent is less than 1/1000, we think the CLK1Frequency is we want.
Otherwise, We will continue to calculate it with the next OD and RDW.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-11 07:48:54 -06:00
Fabio Estevam
0249e4b7f2 m28evk: Fix comment about the number of RAM banks
m28evk has one bank of RAM.

Fix the comment.

Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-11-11 11:36:58 +01:00
Fabio Estevam
c0225d1138 mx31: Fix checkpatch warnings in generic.c
Fix checkpatch warnings in generic.c.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-11-11 11:36:58 +01:00
Fabio Estevam
ce93dc9bce mx31: Use proper IO accessor for GPR register
Use proper IO accessor for GPR register.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-11-11 11:36:58 +01:00