SDRAM data bus width & linux

Due to space limitations, our small embedded system (whicih uses a Samsung S3C2440A processor) uses one SDRAM chip. The address bus is 32 bits, but the data bus is only 16 bits. Is there a special option we can configure on Linux so it knows to use a 16-bit data bus? Similarly, are there options for bootloaders such as vivi or U-boot to specify usage of a 16-bit data bus with a 32-bit address?

Any help is appreciated, and I'll gladly provide as much more information about the system as necessary to help you help me!

Steve Hackworth University of Pittsburgh

Reply to
solarst
Loading thread data ...

You should simply be able to use suitable data sizes. Type most of your items as short, or unsigned short, and they will usually be 16 bits. See limits.h for the actual values. Leave the problem of providing 32 bit operations to the compiler designers (they will probably use a library).

--
 [mail]: Chuck F (cbfalconer at maineline dot net) 
 [page]: 
            Try the download section.
Reply to
CBFalconer

That's not something you configure in Linux. You configure it in the SDRAM controller in teh S3C2440A. That has to be done in startup code long before Linux starts.

The startup code needs to configure the memory controller appropriately. That startup code is either part of the bootloader (if it located in ROM and started directly) or part of a preliminary loader (located in ROM) that configures hardware and then runs the U-Boot or other bootloader.

There's some code in ROM, starting at address 0, that configures the memory controller. That's where you need to set the bus widths and other access parameters.

--
Grant
Reply to
Grant Edwards

It's a 32-bit CPU (ARM920T), so the compiler designers don't care either. It's strictly a memory bus controller setup issue (like an 8088 vs. an 8086, or 68008 vs. 68000 except that it's configurable).

If you've really tight performance constraints you could try using 16-bit data types to limit the memory bandwidth, but the data cache and the burst accesses will largely mask that problem as well.

--
Grant Edwards                   grante             Yow! An air of FRENCH FRIES
                                  at               permeates my nostrils!!
                               visi.com
Reply to
Grant Edwards

Samsung

but

configure

16-bit

information

Thank you very much for the quick feedback! We're looking at bootloader details now. The development board for the S3C2440A comes with a proprietary supervivi bootloader (modified from vivi), so we have to go back and modify the original open-source vivi to duplicate some of the supervivi functionality we want (USB mainly). However, U-boot seems to be more widely used (and newer) and it may be easier to get help if we run into any problems with it.

Reply to
solarst

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.