* questions about porting an 8240 arch to linux
@ 2002-12-05 14:14 Abraham vd Merwe
2002-12-05 15:16 ` Benjamin Herrenschmidt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Abraham vd Merwe @ 2002-12-05 14:14 UTC (permalink / raw)
To: Linux on PowerPC Developers Mail List
Hi!
!!! Here's what I have:
* Board based on Motorola MPC8240 processor (based on 603e core)
* 32M sdram
* 250mhz processor
* board is based on PowerPC microprocessor command hardware reference
platform (CHRP).
!!! Here's what I figured out/did so far. Please correct me if I did
something wrong.
1. used 2.4.18 w/ 2.4.18-ppc patch applied (got it from ftp.kernel.org)
2. added my arch to arch/ppc/config.in
3. added a embed_config() section to arch/ppc/boot/simple/embed_config.c for
my arch with the following hardcoded parameters:
------------< snip <------< snip <------< snip <------------
bd->bi_intfreq = 250 * 1000000;
bd->bi_busfreq = 33 * 1000000;
bd->bi_memsize = 32 * 1024 * 1024;
bd->bi_baudrate = 9600;
------------< snip <------< snip <------< snip <------------
i have no idea what bus bi_busfreq refers to so I assumed PCI running at
33mhz. what is this bus frequency?
4. add an include for my arch header in include/asm-ppc/mpc8xx.h
5. defined the following bd_t structure in my arch header:
------------< snip <------< snip <------< snip <------------
typedef struct {
unsigned int bi_intfreq; /* cpu frequency (hz) */
unsigned int bi_busfreq; /* bus frequency (hz) */
unsigned int bi_memsize; /* size of memory (bytes) */
unsigned int bi_baudrate;
} bd_t;
------------< snip <------< snip <------< snip <------------
6. defined IMAP_ADDR, IMAP_SIZE, NR_8259_INTS in my arch header
!!! things I still need to figure out or don't have a clue about:
1. what is IMAP_ADDR, IMAP_SIZE. I searched for IMMR in the MPC8240
reference manual and couldn't find anything - I have no idea what IMAP_ADDR
should be and I assumed IMAP_SIZE should be 64k like the other platforms.
2. what uart should I use? the user manual claims the board has a 8250
compatible uart, but if I compile in the standard linux 16550 uart support,
it exports the same symbols as those in arch/ppc/boot/simple/m8xx_tty.c
which is compiled when I select M8XX support. I disabled the 16550 support
for now and defined NR_8259_INTS to 16 (what should this be?) for now just
to get it to compile.
3. do I need to setup any registers before branching to the kernel?
--
Regards
Abraham
It's no use crying over spilt milk -- it only makes it salty for the cat.
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Aintree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: questions about porting an 8240 arch to linux
2002-12-05 14:14 questions about porting an 8240 arch to linux Abraham vd Merwe
@ 2002-12-05 15:16 ` Benjamin Herrenschmidt
2002-12-05 15:48 ` Wolfgang Grandegger
2002-12-05 19:50 ` Matt Porter
2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2002-12-05 15:16 UTC (permalink / raw)
To: Abraham vd Merwe; +Cc: Linux on PowerPC Developers Mail List
On Thu, 2002-12-05 at 15:14, Abraham vd Merwe wrote:
>
> Hi!
>
> !!! Here's what I have:
>
> * Board based on Motorola MPC8240 processor (based on 603e core)
> * 32M sdram
> * 250mhz processor
> * board is based on PowerPC microprocessor command hardware reference
> platform (CHRP).
You shouldn't use MPC8xx support, that's for moto embedded CPUS like the
860, 850, 823, ...
You need classic PPC support (that is typically CONFIG_6xx)
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: questions about porting an 8240 arch to linux
2002-12-05 14:14 questions about porting an 8240 arch to linux Abraham vd Merwe
2002-12-05 15:16 ` Benjamin Herrenschmidt
@ 2002-12-05 15:48 ` Wolfgang Grandegger
2002-12-05 19:50 ` Matt Porter
2 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Grandegger @ 2002-12-05 15:48 UTC (permalink / raw)
To: Abraham vd Merwe; +Cc: Linux on PowerPC Developers Mail List
Hello,
I recommend to use the linuxppc_devel_2_4 tree for your embedded board
(have a look to http://penguinppc.org/dev/kernel.shtml for further
information). The configuration and implementation for the Sandpoint
board is a good starting point as it's based on a 8240 as well. Another
good example might be the implementation for the zx4500.
Hope it helps,
Wolfgang.
On 12/05/2002 03:14 PM Abraham vd Merwe wrote:
> Hi!
>
> !!! Here's what I have:
>
> * Board based on Motorola MPC8240 processor (based on 603e core)
> * 32M sdram
> * 250mhz processor
> * board is based on PowerPC microprocessor command hardware reference
> platform (CHRP).
>
> !!! Here's what I figured out/did so far. Please correct me if I did
> something wrong.
>
> 1. used 2.4.18 w/ 2.4.18-ppc patch applied (got it from ftp.kernel.org)
> 2. added my arch to arch/ppc/config.in
> 3. added a embed_config() section to arch/ppc/boot/simple/embed_config.c for
> my arch with the following hardcoded parameters:
>
> ------------< snip <------< snip <------< snip <------------
> bd->bi_intfreq = 250 * 1000000;
> bd->bi_busfreq = 33 * 1000000;
> bd->bi_memsize = 32 * 1024 * 1024;
> bd->bi_baudrate = 9600;
> ------------< snip <------< snip <------< snip <------------
>
> i have no idea what bus bi_busfreq refers to so I assumed PCI running at
> 33mhz. what is this bus frequency?
>
> 4. add an include for my arch header in include/asm-ppc/mpc8xx.h
> 5. defined the following bd_t structure in my arch header:
>
> ------------< snip <------< snip <------< snip <------------
> typedef struct {
> unsigned int bi_intfreq; /* cpu frequency (hz) */
> unsigned int bi_busfreq; /* bus frequency (hz) */
> unsigned int bi_memsize; /* size of memory (bytes) */
> unsigned int bi_baudrate;
> } bd_t;
> ------------< snip <------< snip <------< snip <------------
>
> 6. defined IMAP_ADDR, IMAP_SIZE, NR_8259_INTS in my arch header
>
> !!! things I still need to figure out or don't have a clue about:
>
> 1. what is IMAP_ADDR, IMAP_SIZE. I searched for IMMR in the MPC8240
> reference manual and couldn't find anything - I have no idea what IMAP_ADDR
> should be and I assumed IMAP_SIZE should be 64k like the other platforms.
>
> 2. what uart should I use? the user manual claims the board has a 8250
> compatible uart, but if I compile in the standard linux 16550 uart support,
> it exports the same symbols as those in arch/ppc/boot/simple/m8xx_tty.c
> which is compiled when I select M8XX support. I disabled the 16550 support
> for now and defined NR_8259_INTS to 16 (what should this be?) for now just
> to get it to compile.
>
> 3. do I need to setup any registers before branching to the kernel?
>
> --
>
> Regards
> Abraham
>
> It's no use crying over spilt milk -- it only makes it salty for the cat.
>
> __________________________________________________________
> Abraham vd Merwe - 2d3D, Inc.
>
> Device Driver Development, Outsourcing, Embedded Systems
>
> Cell: +27 82 565 4451 Snailmail:
> Tel: +27 21 761 7549 Block C, Aintree Park
> Fax: +27 21 761 7648 Doncaster Road
> Email: abraham@2d3d.co.za Kenilworth, 7700
> Http: http://www.2d3d.com South Africa
>
>
>
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: questions about porting an 8240 arch to linux
2002-12-05 14:14 questions about porting an 8240 arch to linux Abraham vd Merwe
2002-12-05 15:16 ` Benjamin Herrenschmidt
2002-12-05 15:48 ` Wolfgang Grandegger
@ 2002-12-05 19:50 ` Matt Porter
2 siblings, 0 replies; 4+ messages in thread
From: Matt Porter @ 2002-12-05 19:50 UTC (permalink / raw)
To: Linux on PowerPC Developers Mail List
On Thu, Dec 05, 2002 at 04:14:37PM +0200, Abraham vd Merwe wrote:
> * Board based on Motorola MPC8240 processor (based on 603e core)
> * 32M sdram
> * 250mhz processor
> * board is based on PowerPC microprocessor command hardware reference
> platform (CHRP).
>
> !!! Here's what I figured out/did so far. Please correct me if I did
> something wrong.
>
> 1. used 2.4.18 w/ 2.4.18-ppc patch applied (got it from ftp.kernel.org)
> 2. added my arch to arch/ppc/config.in
> 3. added a embed_config() section to arch/ppc/boot/simple/embed_config.c for
> my arch with the following hardcoded parameters:
This is wrong. You don't need this if you use misc-simple.c
> 4. add an include for my arch header in include/asm-ppc/mpc8xx.h
You are an 8240/603e core. don't touch.
> 5. defined the following bd_t structure in my arch header:
Not needed.
> 6. defined IMAP_ADDR, IMAP_SIZE, NR_8259_INTS in my arch header
Not needed.
> 2. what uart should I use? the user manual claims the board has a 8250
> compatible uart, but if I compile in the standard linux 16550 uart support,
> it exports the same symbols as those in arch/ppc/boot/simple/m8xx_tty.c
> which is compiled when I select M8XX support. I disabled the 16550 support
> for now and defined NR_8259_INTS to 16 (what should this be?) for now just
> to get it to compile.
As benh said, select 6xx/7xx/74xx/... (classic ppc)
> 3. do I need to setup any registers before branching to the kernel?
No, the simple bootloader takes care of it for you.
See platforms/* for examples to make your life easy.
menf1_setup.c:menf1_find_end_of_memory(): get memory size using standard
mpc10x lib.
menf1_setup.c:menf1_platform_init(): setup todc_* to use rtc to handle bus
freqs.
If no RTC on system then see:
zx4500_setup.c:zx4500_calibrate_decr(): setup jiffies.
Take a good look at mpc10x_common.c.
Good luck.
Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-12-05 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-05 14:14 questions about porting an 8240 arch to linux Abraham vd Merwe
2002-12-05 15:16 ` Benjamin Herrenschmidt
2002-12-05 15:48 ` Wolfgang Grandegger
2002-12-05 19:50 ` Matt Porter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).