Problem with sh4 7760 on logic PD lsh-7760-10 card

Fabio Giovagnini <[email protected]> Tue, 5 Oct 2004 11:13:49 +0000
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general
Organization Walbro Italy
Message-ID <[email protected]>
Hi All,
I tried to run linux 2.6.8.1 and the CVS linux-sh tree on lsh-7760-10 card.
I compiled sh-ipl+g for running together the native ipl of the board and wirks 
properly.
I found that the code arch/sh/kernel/cpu/sh4/probe.c
at line 100
        case 0x500 ... 0x501:
                switch (prr) {
                    case 0x10: cpu_data->type = CPU_SH7750R; break;
                    case 0x11: cpu_data->type = CPU_SH7751R; break;
                    case 0x50: cpu_data->type = CPU_SH7760;  break;
                }

doesn't work because of prr is shifted of 4 bits and on the sh 7760 hw manual 
I read the MSB of the first byte is not defined so that it not sure 0x50 is 
really 0x50 but is could be 0x5x (x in [0,...,f]).
In fact I added by test:
                switch ((prr  >>  4) & 0x0f) {
                    case 0x05: cpu_data->type = CPU_SH7760;  break;
                }


and I could boot the kernel successfully.

Why could be such a problem? Is it a bug or am I misundrestandig anything?
If it is a bug, how ca I solve propely it? Shoud I have to add a

#ifdef CONFIG_myboard

#endif

Let me know.

Fabio


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl