Reply by solarst July 2, 20092009-07-02
>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 >
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 by Grant Edwards July 1, 20092009-07-01
On 2009-06-30, CBFalconer <cbfalconer@yahoo.com> wrote:

>> 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! > > 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).
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 by Grant Edwards June 30, 20092009-06-30
On 2009-06-30, solarst <greatjester@hotmail.com> wrote:

> 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?
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.
> 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?
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.
> Any help is appreciated, and I'll gladly provide as much more > information about the system as necessary to help you help me!
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 by CBFalconer June 30, 20092009-06-30
solarst wrote:
> > 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!
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]: <http://cbfalconer.home.att.net> Try the download section.
Reply by solarst June 30, 20092009-06-30
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