Sharad Gupta | 18 Nov 23:36 2003
Picon

U-Boot success .. Linux big test

Hi,

I have been able to port U-Boot to our bare minimum custom board based on
MPC7455. With RS-232 the only peripheral to speak of, it was not a hard
job porting the U-Boot. I am able to run the example hello_world demo. I
had to change some cpu specific code at 1-2 places, I will like to submit
the patches as soon as I get a breather.

But now the big test for me is to run kernel on top of U-Boot. Looking at
u-boot README, I compared the u-boot.h file with linux's
include/asm/ppcboot.h. The only difference is the member bi_mon_func. I am
not able to find out if I have to replicate the same structure of monitor
functions in U-Boot to be passed to kernel on boot or is it handled
elsewhere ? Rite now, I am not able to figure out where the problem lies,
the execution hangs somewhere after handling the control to kernel at 0x00
and it seems my only hope is to put little debug messages (light up the 4
LEDs on board with the last 2-bytes of instruction address) at every
function call.

Thanks for helping,
Sharad Gupta

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
Wolfgang Denk | 19 Nov 01:08 2003
Picon
Picon

Re: U-Boot success .. Linux big test

Dear Sharad Gupta,

in message <Pine.GSO.4.58.0311181720580.29702 <at> buckeye.ece.drexel.edu> you wrote:
> 
> I have been able to port U-Boot to our bare minimum custom board based on
> MPC7455. With RS-232 the only peripheral to speak of, it was not a hard

Congratulations.

> But now the big test for me is to run kernel on top of U-Boot. Looking at
> u-boot README, I compared the u-boot.h file with linux's
> include/asm/ppcboot.h. The only difference is the member bi_mon_func. I am
> not able to find out if I have to replicate the same structure of monitor
> functions in U-Boot to be passed to kernel on boot or is it handled

Simply forget these function pointers.  They  are  a  left-over  from
earlier versions of PPCboot and not used any more.

> the execution hangs somewhere after handling the control to kernel at 0x00
> and it seems my only hope is to put little debug messages (light up the 4
> LEDs on board with the last 2-bytes of instruction address) at every
> function call.

See http://www.denx.de/twiki/bin/view/DULG/LinuxHangsAfterUncompressingKernel

Best regards,

Wolfgang Denk

--

-- 
(Continue reading)

Wolfgang Denk | 19 Nov 01:08 2003
Picon
Picon

Re: U-Boot success .. Linux big test

Dear Sharad Gupta,

in message <Pine.GSO.4.58.0311181720580.29702 <at> buckeye.ece.drexel.edu> you wrote:
> 
> I have been able to port U-Boot to our bare minimum custom board based on
> MPC7455. With RS-232 the only peripheral to speak of, it was not a hard

Congratulations.

> But now the big test for me is to run kernel on top of U-Boot. Looking at
> u-boot README, I compared the u-boot.h file with linux's
> include/asm/ppcboot.h. The only difference is the member bi_mon_func. I am
> not able to find out if I have to replicate the same structure of monitor
> functions in U-Boot to be passed to kernel on boot or is it handled

Simply forget these function pointers.  They  are  a  left-over  from
earlier versions of PPCboot and not used any more.

> the execution hangs somewhere after handling the control to kernel at 0x00
> and it seems my only hope is to put little debug messages (light up the 4
> LEDs on board with the last 2-bytes of instruction address) at every
> function call.

See http://www.denx.de/twiki/bin/view/DULG/LinuxHangsAfterUncompressingKernel

Best regards,

Wolfgang Denk

--

-- 
(Continue reading)

Conn Clark | 19 Nov 03:02 2003

Question about setting the sys clk freq based on a pull up on io.

Hello all,

	We have just finished designing the cpu to our next generation product 
and I'm just getting into the U-boot code. In my preliminary examination 
of our design and U-Boot I ran into an interesting problem and wanted to 
see if anybody had a solution or suggestion on an approach.

	Our design is based on a 333MHz IBM405EP processor. We wish to detect 
the oscilator speed we are using via a pullup or pulldown resistor on an 
IO line. In order to make our product cheap we were planning to drive 
the system clock with a 25MHz oscilator that also drives our ethernet 
phys. We wanted the flexibility to use a second oscilator to drive the 
system clock at 33.3MHz so we could have the option of driving our 
processor, RAM, and PCI bus at the maximum speed. to do this we added a 
second set of pads for an oscilator inbetween the 25MHz oscilator and 
the mcroprocessor, so we only need to cut the trace between the two 
oscilators when we wish to use the 33.3MHz clock.  What I was planning 
to do was initialy configure a microprocessor IO pin as an input and 
read the value of the pull up or pull down to determine the system clock 
speed then reconfigure it as an output to be used as a control line.

	My problem is how do I go about this without severly modifying U-Boots 
structure. In analyzing how to do this I determined that the 
configuration and reading of the IO pin sould be done in a 
board_pre_init function. This rases the issue of passing values between 
the init functions called by board_init_f. My second issue is how do I 
deal with the two frquencies since only one can be defined as 
CONFIG_SYS_CLK_FREQ(which is used in several places) without sticking 
lots of nasty board specific ifdefs through out the code.

(Continue reading)

Andrew May | 19 Nov 03:22 2003
Picon

Re: Question about setting the sys clk freq based on a pull up on io.

On Tue, Nov 18, 2003 at 06:02:29PM -0800, Conn Clark wrote:
> Hello all,
> 
> 	Our design is based on a 333MHz IBM405EP processor. We wish to 
> 	detect the oscilator speed we are using via a pullup or pulldown resistor 
> on an IO line. In order to make our product cheap we were planning to drive 
.....
> 
> 	My problem is how do I go about this without severly modifying 
> 	U-Boots structure. In analyzing how to do this I determined that the 
> configuration and reading of the IO pin sould be done in a 
> board_pre_init function. This rases the issue of passing values between 
> the init functions called by board_init_f. My second issue is how do I 
> deal with the two frquencies since only one can be defined as 
> CONFIG_SYS_CLK_FREQ(which is used in several places) without sticking 
> lots of nasty board specific ifdefs through out the code.
> 
I just have an old copy of the code to look at but for the 405 stuff
_SYS_CLK_FREQ is only used in C code so you can do this in the header
and c code.

#define CONFIG_SYS_CLK_FREQ get_sys_clk_freq()

unsigned int get_sys_clk_freq()
{
	if( *ADDR == 0x1 )
		return 25000000;
	else
		return 33333333;
}
(Continue reading)

Stephan Linz | 19 Nov 08:36 2003
Picon

Re: u-boot and NIOS dk 1s10 board

Am Dienstag, 18. November 2003 16:49 schrieb Wolfgang Denk:
> In message <03111816211506.23084 <at> pcj86> you wrote:
> > > u-boot has a clever mechanism we can use to avoid code
> > > duplication by using the VENDOR make variable. A good
> > > example is in board/siemens: the SCM and CCM boards
> > > both share common code.
> >
> > Sounds interesting. I will spend some time on it next weekend.
>
> Another option is to pass configuration options  from  the  Makefile.
> See  for  example  how  CPU  type, core frequency, availability of L2
> cache and bus mode are handled for the TQM82xx boards.

Yes, I know about because of my last few PPC projects, but I think there are 
to many options for a NIOS board. We have to configure whole CPU 
functionality (not only a board). I'll compare both ways.

br,
Stephan

Wolfgang Denk | 19 Nov 09:59 2003
Picon
Picon

Re: Question about setting the sys clk freq based on a pull up on io.

Dear Conn,

in message <3FBACF35.4020006 <at> esteem.com> you wrote:
> 
> 	My problem is how do I go about this without severly modifying U-Boots 
> structure. In analyzing how to do this I determined that the 
> configuration and reading of the IO pin sould be done in a 
> board_pre_init function. This rases the issue of passing values between 
> the init functions called by board_init_f. My second issue is how do I 

You can store the cpu_clk / bus_clk in the global_data structure.

> deal with the two frquencies since only one can be defined as 
> CONFIG_SYS_CLK_FREQ(which is used in several places) without sticking 
> lots of nasty board specific ifdefs through out the code.

I don't see the need for #ifdef's.

> (Note I didn't look at them all). We realy don't want to have to specify 
> at compile time what frequency we intend on using. This may become an 

I see no need that CONFIG_SYS_CLK_FREQ must be a constant. Instead of

	#define CONFIG_SYS_CLK_FREQ     33333333

you can - for example - use

	#define CONFIG_SYS_CLK_FREQ     my_function_to_read_clocks()

Best regards,
(Continue reading)

Wolfgang Denk | 19 Nov 09:59 2003
Picon
Picon

Re: Question about setting the sys clk freq based on a pull up on io.

Dear Conn,

in message <3FBACF35.4020006 <at> esteem.com> you wrote:
> 
> 	My problem is how do I go about this without severly modifying U-Boots 
> structure. In analyzing how to do this I determined that the 
> configuration and reading of the IO pin sould be done in a 
> board_pre_init function. This rases the issue of passing values between 
> the init functions called by board_init_f. My second issue is how do I 

You can store the cpu_clk / bus_clk in the global_data structure.

> deal with the two frquencies since only one can be defined as 
> CONFIG_SYS_CLK_FREQ(which is used in several places) without sticking 
> lots of nasty board specific ifdefs through out the code.

I don't see the need for #ifdef's.

> (Note I didn't look at them all). We realy don't want to have to specify 
> at compile time what frequency we intend on using. This may become an 

I see no need that CONFIG_SYS_CLK_FREQ must be a constant. Instead of

	#define CONFIG_SYS_CLK_FREQ     33333333

you can - for example - use

	#define CONFIG_SYS_CLK_FREQ     my_function_to_read_clocks()

Best regards,
(Continue reading)

Wolfgang Denk | 19 Nov 10:01 2003
Picon
Picon

Re: u-boot and NIOS dk 1s10 board

In message <03111908361707.23084 <at> pcj86> you wrote:
>
> Yes, I know about because of my last few PPC projects, but I think there are 
> to many options for a NIOS board. We have to configure whole CPU 
> functionality (not only a board). I'll compare both ways.

You can also set "board ID's" which then select blocks of definitions
or sub-includes. See for example the PPChameleon board  (not  that  I
like the names used there much).

Best regards,

Wolfgang Denk

--

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd <at> denx.de
"All God's children are not beautiful. Most of God's children are, in
fact, barely presentable."                            - Fran Lebowitz
Wolfgang Denk | 19 Nov 10:01 2003
Picon
Picon

Re: u-boot and NIOS dk 1s10 board

In message <03111908361707.23084 <at> pcj86> you wrote:
>
> Yes, I know about because of my last few PPC projects, but I think there are 
> to many options for a NIOS board. We have to configure whole CPU 
> functionality (not only a board). I'll compare both ways.

You can also set "board ID's" which then select blocks of definitions
or sub-includes. See for example the PPChameleon board  (not  that  I
like the names used there much).

Best regards,

Wolfgang Denk

--

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd <at> denx.de
"All God's children are not beautiful. Most of God's children are, in
fact, barely presentable."                            - Fran Lebowitz

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/

Gmane