9
0
Fork 0
Commit Graph

4175 Commits

Author SHA1 Message Date
Juergen Beisert 5ed894e9a6 Combine memory initialization with the main memory functions.
Memory allocation is very simple in u-boot-v2. So, it makes also sense to
add the "operating system" emulation layer into the main memory management
source file, to keep them at one place and simple.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert e0a2f39561 Use the global string functions
Don't try to be smarter than GCC. There are various better optimizations
available than to write our own. So, use the globaly available string
functions instead.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert a9dda0de1e Remove win32 support
Remove never used code.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert e70f5a92a9 Remove debug code
When assert() is always defined to do nothing, the debug functions makes no
sense, because they also do nothing. Removing them shrinks the code.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert 86e3217dde Use nowadays function prototypes
Use a function prototype style as used in all other u-boot-v2 sources, too.
Also remove C++ support. We do not use C++ in this project.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert 7fd641558b After moving all declarations to the C source, do the same with the doc
Done in preparation to provide this documentation for doxygen.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert e954ee0647 Remove confusing macros that hide the real functions names
This feature is provided, to support more than u-boot-v2. But its more
confusing than helpful. Remove it and do it straight forward like all other
sources in this tree, too.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert c35e17dc26 Use the native 'void' instead of 'Void_t'
We are in the *NIX world, so keep a 'void' as is.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert 6f1327ad3f Move private settings and configuration into the C source
Include the board config first to be able to configure the memory management
in the documented way. If not used, the defaults are used.
On the other hand, there is no need to pollute the other source files with
these local management settings. So, move them from the header into the
C source file.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert a8abb313cd Remove unused code
Remove unused code to get a better understanding what really is happen in the
source.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert da29ff9e00 Include the 'size_t' declaration
The 'size_t' declaration is needed for the function prototypes.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Juergen Beisert bbc84cabe8 Move variables to bss
There is no need to init variables with 0. So, move them to the bss and let
the C runtime does this job for us.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
2009-12-10 13:09:02 +01:00
Sascha Hauer c5d512eaa2 Merge branch 'for-sha-i2c-imx' of git://git.pengutronix.de/git/mkl/u-boot-v2 2009-12-10 12:22:53 +01:00
Sascha Hauer 899aaa52aa pcm038: update defconfig
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer 21b12270f8 i.MX Nand: fix bit clearing
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer 9af2cfb9ef nand bb: Be sure that fd is at the beginning when erasing
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer 21b96abb7c crc: Do not lseek if not necessary (bb devs do not allow lseek)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer 1dc345ccf2 pcm038: Use a flash based bbt
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer ba03618c77 remove unused include files
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:02 +01:00
Sascha Hauer 3111655cb1 i.MX31: Fix CCM_UPCTL register offset
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Juergen Beisert 118386d83f let linker create a link map
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer f5caf0c5b2 omap: Use correct label in arch/arm/Makefile
Currently all omap boards reside in boards/omap. This is
probably not a good idea as it leaves no good place to
put custom omap boards in. Anyway, make the boards compile
again until someone provides a better solution.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer db21241d3f beagle board: Compile fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer 558c13d29a omap: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer 4300cd1729 pcm043: Add MMU support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer 85520cc9f6 pcm043: add display support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer 9520362888 command line gpio support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer 8ad5fe6ca4 introduce GENERIC_GPIO label
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer f601b74d01 complete i.MX GPIO support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Sascha Hauer 6bd5caf6c6 i.MX: split out iomux-v1 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:15:01 +01:00
Juergen nogit Beisert 28d2ad70a6 mx35 3stack display support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-10 12:14:54 +01:00
Juergen nogit Beisert 4f24fe1b52 fb: Add a i.MX IPU framebuffer driver
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 17:05:55 +01:00
Sascha Hauer 2af6fe64dc fb: Add FB_SYNC_ defines from kernel
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 17:05:55 +01:00
Sascha Hauer ce09de5283 imxfb: show only for relevant i.MXs
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 17:05:54 +01:00
Eric Benard 59be9021d8 nand_imx.c : remove unused code
Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 15:35:22 +01:00
Eric Benard 68176ca7bb nand_imx.c : add reset command
The RESET command was removed during the nand_imx.c driver rework.
The reset commant is necessary in order to get Micron Nand running
as they need a RESET command before being able to get any command.

Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 15:35:22 +01:00
Eric Benard cf6399b2aa Fix imx_nand_set_layout for i.MX27
FMCR is (*((volatile u32 *)(x))) (0x10027814) and thus this leads
to a data abort.

Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-09 15:35:22 +01:00
Marc Kleine-Budde f3e71450c0 i2c-imx: i2c_imx_xfer return with err if sub-transfer isn't successfull
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-09 15:32:02 +01:00
Marc Kleine-Budde 4fe3391e5d i2c-imx: fix low bitrate problem
loop in i2c_imx_acked() in low bit rates it takes some time until the
ACK comes in.

Also add a delay before polling for bus not busy in i2c_imx_read.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-09 15:32:02 +01:00
Marc Kleine-Budde 6d34576586 i2c-imx: fix clear IFF race condition
During i2c read the original pattern was:

1. write i2c slave address
2. wait for transmit complete + clear IIF
3. wait for receive acknowledge
4. wait for IIF interrupt

Due to the clear of the I2SR register, the IIF flag was cleared, too. So
in step 4 the Interrupt wasn't detected. To fix this problem, we move
the clean of IIF before the writing of the slave address. So that it
looks this way:

0. clear IIF
1. write i2c slave address
2. wait for transmit complete
3. wait for receive acknowledge
4. wait for IIF interrupt

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-09 15:32:01 +01:00
Marc Kleine-Budde ed85e6d361 i2c-imx: print errors with dev_err
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2009-12-09 15:32:01 +01:00
Sascha Hauer 4701717357 PCA100: initialize pll in assembler code
The PLL initialisation does not work properly if run from
SDRAM. Move the initialisation code to lowlevel init which
is run in NFC RAM.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:52 +01:00
Sascha Hauer d177626ede nand: do not write empty pages. Needed for writing UBI images
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:51 +01:00
Sascha Hauer 2c84734970 nand: refuse to write data if not beginning on a page boundary
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:51 +01:00
Marc Kleine-Budde 74d14b746d i.MX35 3stack: several enhancements
- Add support for booting from NAND
- Add support for internal Boot mode
- Add I2C PMIC support
- Enable FEC Ethernet controller

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:51 +01:00
Sascha Hauer d870137a17 i.MX flash header: make it work on i.MX35
The flash header is used on different i.MXs other than the
i.MX25, so rename it. Also, add a possibility to put a flash
header on different offsets (0x100, 0x400 and 0x1000), needed
for different boot mediums.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:51 +01:00
Marc Kleine-Budde c762cdbb02 clock.c: use USECOND and MSECOND
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:46 +01:00
Marc Kleine-Budde 9434fe68e4 clock.h: use types.h not linux/types.h
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 11:12:36 +01:00
Sascha Hauer c6f639fafb NAND: Allow to read oob data
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 10:46:47 +01:00
Sascha Hauer 13d2d38aa2 i.MX: remove obsolete V2 Nand driver
Use the generic v1 driver instead

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-03 10:46:47 +01:00