linux-2.6.28.mx233.tgz -- code for interrupts??

93 views
Skip to first unread message

Casainho

unread,
Dec 11, 2010, 7:29:35 PM12/11/10
to rockboxplayer
I am looking for example code of interrupts. FreeScale seems to just
share Linux kernel for imx233. I went to Chumby site to download
"linux-2.6.28.mx233.tgz"... does anyone knows where in that Linux
Kernel source files I can find the code specific for imx233?

Is there any place/source for where I can look to interrupt code?

Chumby sources seems to have a bootloader, to lunch Linux, however
they don't use Interrupts on it...

--
Cumprimentos,
Jorge Pinto

Bob

unread,
Dec 12, 2010, 6:26:27 AM12/12/10
to rockbo...@googlegroups.com
You'll need to apply the patches to the kernel from pkgs\linux-2.6.28-imx_xxx

If you look at the patches labelled "imx233" you can see which files they are patching. The imx233 patches refer to stmp3780, this seems to confirm that the imx233 is at least very close to the STMP3780.

So code specific to imx233 should be in arch/arm/mach-stmp3xxx.

Casainho

unread,
Dec 12, 2010, 6:30:08 AM12/12/10
to rockboxplayer

Ok, I will see that later.

Now, I see that imx233 have 32kbytes internal RAM. ROM bootloader
should read 32kbytes from SDCard to internal RAM and run it... I guess
we can't make a Rokbox bootloader so small...

Bootloader for mini2440 says:

cat rockbox-info.txt
Target: mini2440
Target id: 99
Target define: -DMINI2440
Memory: 64
CPU: arm
Manufacturer: s3c2440
Version: r-1:67M-101212
Binary: bootloader-mini2440.lyre
Binary size: 51360
Actual size: 51360
RAM usage: 354448
gcc: arm-elf-eabi-gcc (GCC) 4.4.4

Casainho

unread,
Dec 12, 2010, 6:38:06 AM12/12/10
to rockboxplayer
casainho> hello
<casainho> does anyone knows why Rockbox bootloader takes so much
memory? Binary size: 51360
<casainho> Actual size: 51360
<casainho> RAM usage: 354448
<casainho> would be possible to make it less than 32kBytes?
<bertrik> casainho, maybe the LCD frame buffer?
<casainho> bertrik: like having a bootloader that doesn't write/use LCD?
<bertrik> yes, something like that. But can't you confirm first by
looking into the map file?
<casainho> bertrik: hmmm, I will try to look and see if I understand..
<casainho> bertrik: can you please look? http://pastebin.com/vn6JgDuV
bertrik> casainho, see line 1740/1741, using about 150k for the LCD
framebuffer (I guess 320*240 16 bit?)
<bertrik> I also saw some kind of codepage table taking 64kB
<bertrik> It will probably be hard to reduce it to less than 32 kB
<casainho> bertrik: ok. However my LCD now is 1bit, 64X48...
<casainho> bertrik: ok, I may need to think on a 1st and 2nd
bootloader... Thanks!

Bob

unread,
Dec 12, 2010, 8:03:04 AM12/12/10
to rockbo...@googlegroups.com
The imx233 Rockbox bootloader doesn't need 150KB LCD frame buffer, but the code size for the mini2440 is 46K alone. It would need a lot of chopping to fit into 32K. I don't think it is even worth trying.

We need to use a bootlet to set up DRAM and then load the Rockbox bootloader. The rockbox bootloader can be placed in the same partition as the imx233 bootloader I think, so we can avoid using a filesystem.

I think that the Chumby using this same approach.

Casainho

unread,
Dec 15, 2010, 12:56:31 PM12/15/10
to rockbo...@googlegroups.com

Ok, so about imx233 code on Linux source, I believe it's here:
linux-2.6.28.mx233/arch/arm/mach-stmp3xxx

Bob, can you please make a sketch/draw about your idea on how we can
put imx233 bootloader + Rockbox bootloader on uSDCard?

Since I remember, the idea is that imx233 bootloader will setup the
SDRAM + init uSDCard + read from uSDCard the Rockbox bootloader and
run it.

Rockbox bootloader will need working drivers for uSDCard + LCD +
buttons, and will use FAT drivers to read Rockbox firmware from
uSDCard FAT partition.

Casainho

unread,
Dec 16, 2010, 7:19:28 AM12/16/10
to rockbo...@googlegroups.com
Bob, I were looking for SDCard drivers on Chumby bootloader and Linux
(from Chumby sources) and I just can found this on file "mmc.c" under
linux-2.6.28.mx233/arch/arm/mach-stmp3xxx:

/* Freescale STMP37XX/STMP378X MMC pin multiplexing */

static int stmp3xxxmmc_hw_init_ssp1(void)
static void stmp3xxxmmc_hw_release_ssp1(void)
static void stmp3xxxmmc_cmd_pullup_ssp1(int enable)
static unsigned long stmp3xxxmmc_setclock_ssp1(unsigned long hz)
void stmp3xxx_set_mmc_data(struct device *dev)

So, seems to me there are no SDCard drivers from imx233 under Linux
source? or I do not understand nothing about this? :-)

Bob

unread,
Dec 16, 2010, 5:02:52 PM12/16/10
to rockbo...@googlegroups.com
The functionality of the drivers is spread around quite a lot. The top level mmc/sd drivers are in drivers/mmc I think. Stuff that is specific to a specific hardware variant is in arch/arm/... Examination of the config files should reveal which drivers are actually used for the imx233.
Reply all
Reply to author
Forward
0 new messages