* Re: [PATCH] ppc44x: support for 256K PAGE_SIZE
From: Wolfgang Denk @ 2007-10-19 19:04 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev
In-Reply-To: <20071019113634.397c63f7@weaponx.rchland.ibm.com>
Dear Josh,
in message <20071019113634.397c63f7@weaponx.rchland.ibm.com> you wrote:
>
> > The following patch adds support for 256KB PAGE_SIZE on ppc44x-based boards.
> > The applications to be run on the kernel with 256KB PAGE_SIZE have to be
> > built using the modified version of binutils, where the MAXPAGESIZE
> > definition is set to 0x40000 (as opposite to standard 0x10000).
...
>
> BTW, what tree did you base this on? I don't seem to have the
> PPC_PAGE_* options in my tree.
If you like to see the patches in context, you can find this stuff in
the linux-2.6-denx repository at denx.de
The 256K page size stuff is based on and requires as prerequisite the
"ppc: Add support for bigger page sizes than 4KB on PPC44x" posted
here on April 25, see
http://patchwork.ozlabs.org/linuxppc/patch?q=Add%20support%20for%20bigger%20page%20sizes&id=10646
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Q: Why do PCs have a reset button on the front?
A: Because they are expected to run Microsoft operating systems.
^ permalink raw reply
* [PATCH] powerpc: mpic: minor optimization of ipi handler
From: Olof Johansson @ 2007-10-19 18:51 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, jgarzik
Jeff Garzik pointed out that we don't actually have to lookup the mpic
instance since it's passed in as the interrupt handler data for IPIs.
Signed-off-by: Olof Johansson <olof@lixom.net>
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index e479388..6bf56f4 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -612,11 +612,10 @@ static inline void mpic_eoi(struct mpic *mpic)
}
#ifdef CONFIG_SMP
-static irqreturn_t mpic_ipi_action(int irq, void *dev_id)
+static irqreturn_t mpic_ipi_action(int irq, void *data)
{
- struct mpic *mpic;
+ struct mpic *mpic = data;
- mpic = mpic_find(irq, NULL);
smp_message_recv(mpic_irq_to_hw(irq) - mpic->ipi_vecs[0]);
return IRQ_HANDLED;
^ permalink raw reply related
* Re: Merge dtc
From: Sam Ravnborg @ 2007-10-19 18:42 UTC (permalink / raw)
To: Milton Miller, ppcdev, Paul Mackerras
In-Reply-To: <20071019071033.GB27017@localhost.localdomain>
Hi David.
> > Give me a day or two then I shall give it a try and see what I can
> > do about it. I will use the previsous posted URL as basis if you do
> > not tell me otherwise.
>
> Thank you. The previous URL should be fine, I've made no changes
> since then.
I decided to go for a kbuild specific version integrated
in boot/Makefile.
This is much more readable because this syntax is explicit.
We do not favour 3 levels of variabls to avoid rewriting the same
filename two times.
I have tested the change only with a O=.. crosscompile build.
I have tested the patch with and without DTC_GENPARSER=1.
It does not rebuild if not needed and is OK with -j10 builds.
Please consider this version in favour of your old version.
Take this as review feedback.
You can add:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org> [kbuild integration only]
Thanks,
Sam
arch/powerpc/boot/Makefile | 40 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 18e3271..064dc07 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -108,17 +108,53 @@ $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE
$(obj)/wrapper.a: $(obj-wlib) FORCE
$(call if_changed,bootar)
-hostprogs-y := addnote addRamDisk hack-coff mktree
+hostprogs-y := addnote addRamDisk hack-coff mktree dtc
targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
wrapper :=$(srctree)/$(src)/wrapper
-wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
+wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree dtc) \
$(wrapper) FORCE
#############
+# Bits for building dtc
+# DTC_GENPARSER := 1 # Uncomment to rebuild flex/bison output
+
+dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o srcpos.o
+dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
+dtc-objs := $(addprefix dtc-src/, $(dtc-objs))
+
+# prerequisites on generated files needs to be explicit
+$(obj)/dtc-src/dtc-parser.tab.o: $(obj)/dtc-src/dtc-parser.tab.c $(obj)/dtc-src/dtc-parser.tab.h
+$(obj)/dtc-src/dtc-lexer.lex.o: $(obj)/dtc-src/dtc-lexer.lex.c
+$(obj)/dtc-src/data.o: $(obj)/dtc-src/dtc-parser.tab.h
+
+HOSTCFLAGS += -I$(src)/dtc-src/
+
+targets += dtc-src/dtc-parser.tab.c
+targets += dtc-src/dtc-lexer.lex.c
+
+ifdef DTC_GENPARSER
+BISON = bison
+FLEX = flex
+
+quiet_cmd_bison = BISON $@
+ cmd_bison = $(BISON) -o$@ -d $<; cp $@ $@_shipped
+quiet_cmd_flex = FLEX $@
+ cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped
+
+$(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE
+ $(call if_changed,bison)
+
+$(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c
+
+$(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE
+ $(call if_changed,flex)
+endif
+
+#############
# Bits for building various flavours of zImage
ifneq ($(CROSS32_COMPILE),)
^ permalink raw reply related
* embedded a default dtb in the kernel (was merge dtc)
From: Leisner, Martin @ 2007-10-19 18:30 UTC (permalink / raw)
To: linuxppc-dev
Is there a way to embed a default dtb into the kernel?
When I build a kernel, I want to embed a dtb into it --
so I don't have to deal with the headaches of finding the
right file to match the right board (its always easier to
deal with 1 file than 2).
If there is, it makes sense to put dtc into the tree.
If there's not, there should be a way to embed dtb's; and put
dtc and dts's into the tree.
If there can't be (I haven't examined this but relaying my
experiences), then it should be in a separate repository
(but the DTS and DTC should be in one place).
It was a little difficult to cobble together a working=20
system the first time.
Also, mkimage SHOULD definitely go in the tree. Its necessary
to build, hence should be in the tree...
There are cases where one kernel can support multiple boards/DTBs.
I guess boot flags can control whether to use an embedded DTB or
one passed from uboot...
marty
^ permalink raw reply
* Re: SystemACE driver problem
From: Grant Likely @ 2007-10-19 18:20 UTC (permalink / raw)
To: aauer1; +Cc: linuxppc-embedded
In-Reply-To: <13300089.post@talk.nabble.com>
On 10/19/07, aauer1 <aauer1@gmx.at> wrote:
>
>
>
> Grant Likely-2 wrote:
> >
> > On 10/19/07, aauer1 <aauer1@gmx.at> wrote:
> >>
> >> Hello
> >>
> >> I'm trying to boot a Linux Kernel 2.6.23-rc2 from Grant Likely (thanks
> >> for
> >> the great work) on a Xilinx ML403 board. I want to use the second
> >> partition
> >> of the Compact Flash Card as root filesystem. But the boot process hangs
> >> at
> >> the initialization of the SystemACE module. A strange effect is that the
> >> DONE LED (configuration of the FPGA is done) turns off. So, this means
> >> that
> >> the FPGA loses his configuration.
> >> Has anybody recognized a similar problem with the SystemACE module??
> >>
> >> The boot log:
> >> ========
> > [snipped]
> >> [ 0.268807] uartlite.0: ttyUL0 at MMIO 0x40600000 (irq = 2) is a
> >> uartlite
> >> [ 0.270399] console [ttyUL0] enabled
> >> [ 1.762725] RAMDISK driver initialized: 8 RAM disks of 8192K size 1024
> >> blocke
> >> [ 1.852062] Registering Xilinx SystemACE driver, major=254
> >> [ 1.919734] xsysace xsysace.0: ace_probe(c01638e0)
> >
> > Yes, I've seen that. It means something went wrong with the setup and
> > caused the sysace to reload the FPGA. Is the systemace base address
> > and bus width set correctly?
> >
> >
>
> The base address is the same as in the system.mhs file of my hardware
> design. So, I think it should be correct. The bus width is set to 16 bits
> (hardware design). So far as I can see, the sysace driver defines a 16 bit
> data bus (hard coded), too.
Hmmm; that's all very odd. I don't know what could be causing that.
> A paper of BlueCat Linux says that there is a problem with the System ACE
> hardware module:
> "Due to a known problem of the opb_sysace IP Core programmed into the FPGA
> (incorrect operation in the interrupt mode) the SystemACE Compact Flash
> device is supported in the polling mode."
>
> Does anyone know something about the bug in the SystemACE IP core??
I don't know about the old xilinx supplied sysace driver, but the new
xsysace.c driver is robust enough to work around missed interrupts. I
don't know of any other problems with the opb_sysace IP core.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: SystemACE driver problem
From: aauer1 @ 2007-10-19 18:13 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <fa686aa40710190704j18feabf2geb417d554ebb11c@mail.gmail.com>
Grant Likely-2 wrote:
>
> On 10/19/07, aauer1 <aauer1@gmx.at> wrote:
>>
>> Hello
>>
>> I'm trying to boot a Linux Kernel 2.6.23-rc2 from Grant Likely (thanks
>> for
>> the great work) on a Xilinx ML403 board. I want to use the second
>> partition
>> of the Compact Flash Card as root filesystem. But the boot process hangs
>> at
>> the initialization of the SystemACE module. A strange effect is that the
>> DONE LED (configuration of the FPGA is done) turns off. So, this means
>> that
>> the FPGA loses his configuration.
>> Has anybody recognized a similar problem with the SystemACE module??
>>
>> The boot log:
>> ========
> [snipped]
>> [ 0.268807] uartlite.0: ttyUL0 at MMIO 0x40600000 (irq = 2) is a
>> uartlite
>> [ 0.270399] console [ttyUL0] enabled
>> [ 1.762725] RAMDISK driver initialized: 8 RAM disks of 8192K size 1024
>> blocke
>> [ 1.852062] Registering Xilinx SystemACE driver, major=254
>> [ 1.919734] xsysace xsysace.0: ace_probe(c01638e0)
>
> Yes, I've seen that. It means something went wrong with the setup and
> caused the sysace to reload the FPGA. Is the systemace base address
> and bus width set correctly?
>
>
The base address is the same as in the system.mhs file of my hardware
design. So, I think it should be correct. The bus width is set to 16 bits
(hardware design). So far as I can see, the sysace driver defines a 16 bit
data bus (hard coded), too.
A paper of BlueCat Linux says that there is a problem with the System ACE
hardware module:
"Due to a known problem of the opb_sysace IP Core programmed into the FPGA
(incorrect operation in the interrupt mode) the SystemACE Compact Flash
device is supported in the polling mode."
Does anyone know something about the bug in the SystemACE IP core??
Thanks,
Andreas
--
View this message in context: http://www.nabble.com/SystemACE-driver-problem-tf4651846.html#a13300089
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* DTC: DTC {before,after} Comparison Script
From: Jon Loeliger @ 2007-10-19 17:49 UTC (permalink / raw)
To: linuxppc-dev
Guys,
And just for the record, here is the QAD script that
I used to verify that all the existing DTS files in
the arch/powerpc/boot/dts directory are byte-identical
before and after my recent modifications. Naturally,
all the DTS files are still in "legacy dts-version 0"
still. But I don't think I broke that mode now. :-)
Feel free to productize or otherwise improve on it...
jdl
----------------------------------------------------------------
#!/usr/bin/perl
my $dtc_old = "dtc/dtc-old";
my $dtc_new = "dtc/dtc-new-debug";
my $basic_options = "-b 0 -f -I dts -O dtb";
my $linux_dts_dir = "linux-2.6/arch/powerpc/boot/dts";
# Yeah, sure, we could, like, readdir() this instead...
my @boards = (
"bamboo",
"ebony",
"ep88xc",
"holly",
"kilauea",
"kuroboxHD",
"kuroboxHG",
"lite5200",
"lite5200b",
"mpc7448hpc2",
"mpc8272ads",
"mpc8313erdb",
"mpc832x_mds",
"mpc832x_rdb",
"mpc8349emitx",
"mpc8349emitxgp",
"mpc834x_mds",
"mpc836x_mds",
"mpc8540ads",
"mpc8541cds",
"mpc8544ds",
"mpc8548cds",
"mpc8555cds",
"mpc8560ads",
"mpc8568mds",
"mpc8572ds",
"mpc8610_hpcd",
"mpc8641_hpcn",
"mpc866ads", # Feh. Bad node references...
"mpc885ads",
"pq2fads",
"prpmc2800",
"ps3",
"sequoia",
"walnut",
);
foreach my $board (@boards) {
my $dts_file = "$linux_dts_dir/$board.dts";
my $old_dtb_file = "/tmp/$board.dtb.old";
my $new_dtb_file = "/tmp/$board.dtb.new";
my $cmd_old = "$dtc_old $basic_options -o $old_dtb_file $dts_file";
my $cmd_new = "$dtc_new $basic_options -o $new_dtb_file $dts_file";
my $cmd_cmp = "cmp $old_dtb_file $new_dtb_file";
print "------------------------------------------------\n";
print "OLD: $cmd_old\n";
unlink($old_dtb_file) if (-f $old_dtb_file);
system("$cmd_old >& /dev/null");
my $status = $?;
if ($status) {
print " FAILED to run old DTC on $board\n";
}
print "NEW: $cmd_new\n";
unlink($new_dtb_file) if (-f $new_dtb_file);
system("$cmd_new >& /dev/null");
$status = $?;
if ($status) {
print " FAILED to run new DTC on $board\n";
}
if (-f $old_dtb_file && -f $new_dtb_file) {
print "CMP: $cmd_cmp\n";
system($cmd_cmp);
$status = $?;
if ($status) {
print " FAILED $board\n";
}
} else {
printf " FAILED: Missing dtb file\n";
}
}
^ permalink raw reply
* [PATCH 4/4] DTC: Begin the path to sane literals and expressions.
From: Jon Loeliger @ 2007-10-19 17:43 UTC (permalink / raw)
To: linuxppc-dev
Add support for the "/dts-version/ <number>;" statment.
Make legacy DTS files version 0 whether explicitly stated
or implied by a lack of /dts-version/ statement.
Begin supporting a new /dts-version/ 1 that changes the
format of the literals in a DTS source file. In the new
format, hex constants are prefixed with 0x or 0X, and
bare numbers are decimal or octal according to standard
conventions.
Property names have been limited to start with
characters from the set [a-zA-Z,._#?]. That is, the
digits and the expression symbols have been removed.
Use of "d#', "o#", "h#" and "b#" are gone in version 1.
Several warnings are introduced for debatable constructs.
- Only /dts-version/ 0 and 1 are supported yet.
- A missing /dts-version/ statement garners a
suggestion to add one, and defaults to verion 0.
- The /memreserve/ construct using "-" for ranges looks
suspiciously like the subtraction of two expressions,
so its syntax has been changed to use ".." as the range
indicator.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
dtc-lexer.l | 180 +++++++++++++++++++++++++++++++++++++++++++++------------
dtc-parser.y | 143 +++++++++++++++++++++++++++++++---------------
dtc.c | 26 ++++++++
dtc.h | 23 ++++++--
srcpos.h | 1 +
treesource.c | 24 +++++++-
6 files changed, 303 insertions(+), 94 deletions(-)
diff --git a/dtc-lexer.l b/dtc-lexer.l
index 278a96e..a1c52c4 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -22,12 +22,19 @@
%x INCLUDE
%x CELLDATA
+%x CELLDATA_LEGACY
%x BYTESTRING
+%x BYTESTRING_LEGACY
%x MEMRESERVE
+%x MEMRESERVE_LEGACY
+DIGIT [0-9]
+HEXDIGIT [0-9a-fA-F]
+FIRSTPROPCHAR [a-zA-Z,._#?]
PROPCHAR [a-zA-Z0-9,._+*#?-]
UNITCHAR [0-9a-f,]
WS [[:space:]]
+DOT [.]
REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
@@ -46,11 +53,20 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
#endif
+unsigned int in_lexer_use_base = 16; /* Feedback from parser. Ugh. */
+
%}
%%
+"/dts-version/" {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ DPRINT("Keyword: /dts-version/\n");
+ return DT_DTS_VERSION;
+ }
+
"/include/" BEGIN(INCLUDE);
<INCLUDE>\"[^"\n]*\" {
@@ -83,24 +99,15 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
yylloc.filenum = srcpos_filenum;
yylloc.first_line = yylineno;
DPRINT("Keyword: /memreserve/\n");
- BEGIN(MEMRESERVE);
- return DT_MEMRESERVE;
- }
-
-<MEMRESERVE>[0-9a-fA-F]+ {
- yylloc.filenum = srcpos_filenum;
- yylloc.first_line = yylineno;
- if (yyleng > 2*sizeof(yylval.addr)) {
- fprintf(stderr, "Address value %s too large\n",
- yytext);
+ if (dts_version == 0) {
+ BEGIN(MEMRESERVE_LEGACY);
+ } else {
+ BEGIN(MEMRESERVE);
}
- yylval.addr = (u64) strtoull(yytext, NULL, 16);
- DPRINT("Addr: %llx\n",
- (unsigned long long)yylval.addr);
- return DT_ADDR;
+ return DT_MEMRESERVE;
}
-<MEMRESERVE>";" {
+<MEMRESERVE,MEMRESERVE_LEGACY>";" {
yylloc.filenum = srcpos_filenum;
yylloc.first_line = yylineno;
DPRINT("/MEMRESERVE\n");
@@ -117,7 +124,7 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
return DT_LABEL;
}
-<CELLDATA>[bodh]# {
+<CELLDATA_LEGACY>[bodh]# {
yylloc.filenum = srcpos_filenum;
yylloc.first_line = yylineno;
if (*yytext == 'b')
@@ -132,15 +139,7 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
return DT_BASE;
}
-<CELLDATA>[0-9a-fA-F]+ {
- yylloc.filenum = srcpos_filenum;
- yylloc.first_line = yylineno;
- yylval.str = strdup(yytext);
- DPRINT("Cell: '%s'\n", yylval.str);
- return DT_CELL;
- }
-
-<CELLDATA>">" {
+<CELLDATA,CELLDATA_LEGACY>">" {
yylloc.filenum = srcpos_filenum;
yylloc.first_line = yylineno;
DPRINT("/CELLDATA\n");
@@ -156,15 +155,7 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
return DT_REF;
}
-<BYTESTRING>[0-9a-fA-F]{2} {
- yylloc.filenum = srcpos_filenum;
- yylloc.first_line = yylineno;
- yylval.byte = strtol(yytext, NULL, 16);
- DPRINT("Byte: %02x\n", (int)yylval.byte);
- return DT_BYTE;
- }
-
-<BYTESTRING>"]" {
+<BYTESTRING,BYTESTRING_LEGACY>"]" {
yylloc.filenum = srcpos_filenum;
yylloc.first_line = yylineno;
DPRINT("/BYTESTRING\n");
@@ -182,7 +173,63 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
return yytext[0];
}
-{PROPCHAR}+ {
+
+<MEMRESERVE_LEGACY>{HEXDIGIT}+ {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ DPRINT("LEGACY MEMRESERVE LITERAL bare hex: '%s'\n",
+ yytext);
+ yylval.ire = expr_from_string(yytext, 16);
+ in_lexer_use_base = expr_default_base;
+ return DT_LITERAL;
+ }
+
+<CELLDATA_LEGACY>{HEXDIGIT}+ {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ DPRINT("LEGACY CELLDATA LITERAL bare hex: '%s'\n",
+ yytext);
+ yylval.ire = expr_from_string(yytext,
+ in_lexer_use_base);
+ in_lexer_use_base = expr_default_base;
+ return DT_LITERAL;
+ }
+
+<BYTESTRING_LEGACY>[0-9a-fA-F]{2} {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ yylval.ire = strtol(yytext, NULL, 16);
+ DPRINT("LEGACY BYTE LITERAL: %02x\n", (int)yylval.ire);
+ return DT_LITERAL;
+ }
+
+
+<CELLDATA,MEMRESERVE,BYTESTRING>{DIGIT}+ {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ DPRINT("CONTEXT LITERAL bare dec: '%s'\n", yytext);
+ yylval.ire = expr_from_string(yytext, 0);
+ return DT_LITERAL;
+ }
+
+<CELLDATA,MEMRESERVE,BYTESTRING>0(x|X){HEXDIGIT}+ {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ yylval.ire = expr_from_string(yytext, 0);
+ DPRINT("CONTEXT LITERAL 0x: '%llx'\n",
+ (unsigned long long)yylval.ire);
+ return DT_LITERAL;
+ }
+
+
+<*>{DOT}{DOT} {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ DPRINT("DT_RANGE\n");
+ return DT_RANGE;
+ }
+
+{FIRSTPROPCHAR}{PROPCHAR}+ {
yylloc.filenum = srcpos_filenum;
yylloc.first_line = yylineno;
DPRINT("PropName: %s\n", yytext);
@@ -190,7 +237,7 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
return DT_PROPNAME;
}
-{PROPCHAR}+(@{UNITCHAR}+)? {
+{FIRSTPROPCHAR}{PROPCHAR}+(@{UNITCHAR}+)? {
yylloc.filenum = srcpos_filenum;
yylloc.first_line = yylineno;
DPRINT("NodeName: %s\n", yytext);
@@ -198,6 +245,23 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
return DT_NODENAME;
}
+{DIGIT}+ {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ yylval.ire = expr_from_string(yytext, 0);
+ DPRINT("LITERAL: '%llx'\n",
+ (unsigned long long)yylval.ire);
+ return DT_LITERAL;
+ }
+
+0(x|X){HEXDIGIT}+ {
+ yylloc.filenum = srcpos_filenum;
+ yylloc.first_line = yylineno;
+ DPRINT("LITERAL bare hex: '%s'\n", yytext);
+ yylval.ire = expr_from_string(yytext, 0);
+ return DT_LITERAL;
+ }
+
<*>{WS}+ /* eat whitespace */
@@ -216,11 +280,19 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
switch (yytext[0]) {
case '<':
DPRINT("CELLDATA\n");
- BEGIN(CELLDATA);
+ if (dts_version == 0) {
+ BEGIN(CELLDATA_LEGACY);
+ } else {
+ BEGIN(CELLDATA);
+ }
break;
case '[':
DPRINT("BYTESTRING\n");
- BEGIN(BYTESTRING);
+ if (dts_version == 0) {
+ BEGIN(BYTESTRING_LEGACY);
+ } else {
+ BEGIN(BYTESTRING);
+ }
break;
default:
@@ -339,3 +411,35 @@ int pop_input_file(void)
return 1;
}
+
+/*
+ * Convert a string representation of a numeric literal
+ * in the given base into a binary representation.
+ *
+ * FIXME: should these specification errors be fatal instead?
+ */
+
+u64 expr_from_string(char *s, unsigned int base)
+{
+ u64 v;
+ char *e;
+
+ v = strtoull(s, &e, base);
+ if (*e) {
+ fprintf(stderr,
+ "Line %d: Invalid literal value '%s' : "
+ "%c is not a base %d digit; %lld assumed\n",
+ yylloc.first_line, s, *e,
+ base == 0 ? expr_default_base : base,
+ (unsigned long long) v);
+ }
+
+ if (errno == EINVAL || errno == ERANGE) {
+ fprintf(stderr,
+ "Line %d: Invalid literal value '%s'; %lld assumed\n",
+ yylloc.first_line, s, (unsigned long long) v);
+ errno = 0;
+ }
+
+ return v;
+}
diff --git a/dtc-parser.y b/dtc-parser.y
index 4698793..fd82381 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -27,6 +27,8 @@
int yylex(void);
cell_t cell_from_string(char *s, unsigned int base);
+cell_t expr_cell_value(u64 c);
+u8 expr_byte_value(u64 c);
extern struct boot_info *the_boot_info;
@@ -35,7 +37,6 @@ extern struct boot_info *the_boot_info;
%union {
cell_t cval;
unsigned int cbase;
- u8 byte;
char *str;
struct data data;
struct property *prop;
@@ -46,25 +47,27 @@ extern struct boot_info *the_boot_info;
int hexlen;
u64 addr;
struct reserve_info *re;
+ u64 ire;
}
+%token DT_DTS_VERSION
%token DT_MEMRESERVE
-%token <addr> DT_ADDR
%token <str> DT_PROPNAME
%token <str> DT_NODENAME
%token <cbase> DT_BASE
-%token <str> DT_CELL
-%token <byte> DT_BYTE
%token <data> DT_STRING
%token <str> DT_UNIT
%token <str> DT_LABEL
%token <str> DT_REF
+%token <ire> DT_LITERAL
+%token DT_RANGE
%type <data> propdata
%type <data> propdataprefix
%type <re> memreserve
%type <re> memreserves
%type <cbase> opt_cell_base
+%type <cval> cell
%type <data> celllist
%type <data> bytestring
%type <prop> propdef
@@ -76,13 +79,27 @@ extern struct boot_info *the_boot_info;
%type <nodelist> subnodes
%type <str> label
%type <str> nodename
+%type <ire> expr
+%type <ire> expr_primary
%%
sourcefile:
- memreserves devicetree
+ opt_version memreserves devicetree
{
- the_boot_info = build_boot_info($1, $2);
+ the_boot_info = build_boot_info($2, $3);
+ }
+ ;
+
+opt_version:
+ /* empty */
+ {
+ yywarn("Missing /dts-version/; 0 assumed.");
+ set_dts_version(0);
+ }
+ | DT_DTS_VERSION expr ';'
+ {
+ set_dts_version($2);
}
;
@@ -98,11 +115,16 @@ memreserves:
;
memreserve:
- label DT_MEMRESERVE DT_ADDR DT_ADDR ';'
+ label DT_MEMRESERVE expr expr ';'
{
$$ = build_reserve_entry($3, $4, $1);
}
- | label DT_MEMRESERVE DT_ADDR '-' DT_ADDR ';'
+ | label DT_MEMRESERVE expr '-' expr ';'
+ {
+ yywarn("/memreserve/ using '-' should be converted to '..' instead.");
+ $$ = build_reserve_entry($3, $5 - $3 + 1, $1);
+ }
+ | label DT_MEMRESERVE expr DT_RANGE expr ';'
{
$$ = build_reserve_entry($3, $5 - $3 + 1, $1);
}
@@ -179,19 +201,10 @@ propdataprefix:
}
;
-opt_cell_base:
- /* empty */
- {
- $$ = 16;
- }
- | DT_BASE
- ;
-
celllist:
- celllist opt_cell_base DT_CELL
+ celllist cell
{
- $$ = data_append_cell($1,
- cell_from_string($3, $2));
+ $$ = data_append_cell($1, $2);
}
| celllist DT_REF
{
@@ -207,8 +220,39 @@ celllist:
}
;
+cell:
+ expr
+ {
+ $$ = expr_cell_value($1);
+ }
+ ;
+
+expr:
+ expr_primary
+ ;
+
+expr_primary:
+ opt_cell_base DT_LITERAL
+ {
+ $$ = $2;
+ }
+ ;
+
+opt_cell_base:
+ /* empty */
+ {
+ /* This is a lot gross, but hopefully temporary. */
+ in_lexer_use_base = 16;
+ }
+ | DT_BASE
+ {
+ /* This is a lot gross, but hopefully temporary. */
+ in_lexer_use_base = $1;
+ }
+ ;
+
bytestring:
- bytestring DT_BYTE
+ bytestring expr
{
$$ = data_append_byte($1, $2);
}
@@ -264,7 +308,7 @@ label:
%%
-void yyerror (char const *s)
+void yyerror(char const *s)
{
const char *fname = srcpos_filename_for_num(yylloc.filenum);
@@ -276,32 +320,37 @@ void yyerror (char const *s)
}
-/*
- * Convert a string representation of a numeric cell
- * in the given base into a cell.
- *
- * FIXME: should these specification errors be fatal instead?
- */
+void yywarn(char const *s, ...)
+{
+ va_list ap;
+ const char *fname;
+
+ if (quiet >= 1)
+ return;
-cell_t cell_from_string(char *s, unsigned int base)
+ va_start(ap, s);
+
+ fname = srcpos_filename_for_num(yylloc.filenum);
+ if (strcmp(fname, "-") == 0)
+ fname = "stdin";
+
+ fprintf(stderr, "%s:%d Warning: ", fname, yylloc.first_line);
+ vfprintf(stderr, s, ap);
+ fprintf(stderr, "\n");
+}
+
+
+cell_t expr_cell_value(u64 c)
{
- cell_t c;
- char *e;
-
- c = strtoul(s, &e, base);
- if (*e) {
- fprintf(stderr,
- "Line %d: Invalid cell value '%s' : "
- "%c is not a base %d digit; %d assumed\n",
- yylloc.first_line, s, *e, base, c);
- }
-
- if (errno == EINVAL || errno == ERANGE) {
- fprintf(stderr,
- "Line %d: Invalid cell value '%s'; %d assumed\n",
- yylloc.first_line, s, c);
- errno = 0;
- }
-
- return c;
+ /* FIXME: Range check to fit in u32 cell_t */
+
+ return (cell_t) c;
+}
+
+
+u8 expr_byte_value(u64 c)
+{
+ /* FIXME: Range check to fit in u8 byte */
+
+ return (u8) c;
}
diff --git a/dtc.c b/dtc.c
index 76a6dfe..6417c2d 100644
--- a/dtc.c
+++ b/dtc.c
@@ -30,6 +30,32 @@ int quiet; /* Level of quietness */
int reservenum; /* Number of memory reservation slots */
int minsize; /* Minimum blob size */
+/*
+ * DTS sourcefile version.
+ */
+unsigned int dts_version = 0;
+unsigned int expr_default_base = 10;
+
+
+void set_dts_version(u64 vers)
+{
+ if (vers > 1) {
+ yywarn("Unknown version %lld; 0 assumed\n", vers);
+ dts_version = 0;
+ } else {
+ dts_version = vers;
+ }
+
+ if (dts_version == 0) {
+ expr_default_base = 16;
+ in_lexer_use_base = 16;
+ } else {
+ expr_default_base = 10;
+ in_lexer_use_base = 10;
+ }
+}
+
+
char *join_path(char *path, char *name)
{
int lenp = strlen(path);
diff --git a/dtc.h b/dtc.h
index 09dec54..900ad9f 100644
--- a/dtc.h
+++ b/dtc.h
@@ -36,7 +36,14 @@
#include <fdt.h>
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
+typedef u32 cell_t;
+
#define DEFAULT_FDT_VERSION 17
+
/*
* Command line options
*/
@@ -44,6 +51,13 @@ extern int quiet; /* Level of quietness */
extern int reservenum; /* Number of memory reservation slots */
extern int minsize; /* Minimum blob size */
+/*
+ * DTS sourcefile version
+ */
+extern unsigned int dts_version;
+extern void set_dts_version(u64 vers);
+
+
static inline void __attribute__((noreturn)) die(char * str, ...)
{
va_list ap;
@@ -74,12 +88,6 @@ static inline void *xrealloc(void *p, size_t len)
return new;
}
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-typedef u32 cell_t;
-
#define cpu_to_be16(x) htons(x)
#define be16_to_cpu(x) ntohs(x)
@@ -237,5 +245,8 @@ struct boot_info *dt_from_fs(char *dirname);
char *join_path(char *path, char *name);
void fill_fullpaths(struct node *tree, char *prefix);
+u64 expr_from_string(char *s, unsigned int base);
+extern unsigned int in_lexer_use_base;
+unsigned int expr_default_base;
#endif /* _DTC_H */
diff --git a/srcpos.h b/srcpos.h
index ce7ab5b..c285e47 100644
--- a/srcpos.h
+++ b/srcpos.h
@@ -63,6 +63,7 @@ typedef struct YYLTYPE {
extern void yyerror(char const *);
+extern void yywarn(char const *, ...);
extern int srcpos_filenum;
diff --git a/treesource.c b/treesource.c
index f62041f..653be3a 100644
--- a/treesource.c
+++ b/treesource.c
@@ -147,7 +147,11 @@ static void write_propval_cells(FILE *f, struct data val)
fprintf(f, " = <");
for (;;) {
- fprintf(f, "%x", be32_to_cpu(*cp++));
+ if (dts_version == 0) {
+ fprintf(f, "%x", be32_to_cpu(*cp++));
+ } else {
+ fprintf(f, "0x%x", be32_to_cpu(*cp++));
+ }
if ((void *)cp >= propend)
break;
fprintf(f, " ");
@@ -162,7 +166,11 @@ static void write_propval_bytes(FILE *f, struct data val)
fprintf(f, " = [");
for (;;) {
- fprintf(f, "%02hhx", *bp++);
+ if (dts_version == 0) {
+ fprintf(f, "%02hhx", *bp++);
+ } else {
+ fprintf(f, "0x%02hhx", *bp++);
+ }
if ((void *)bp >= propend)
break;
fprintf(f, " ");
@@ -218,12 +226,22 @@ static void write_tree_source_node(FILE *f, struct node *tree, int level)
void dt_to_source(FILE *f, struct boot_info *bi)
{
struct reserve_info *re;
+ const char *range_str;
+
+ if (dts_version == 0) {
+ range_str = " - ";
+ } else {
+ range_str = " .. ";
+ fprintf(f, "/dts-version/ %d;\n\n", dts_version);
+ }
for (re = bi->reservelist; re; re = re->next) {
- fprintf(f, "/memreserve/\t%016llx-%016llx;\n",
+ fprintf(f, "/memreserve/\t0x%016llx %s 0x%016llx;\n",
(unsigned long long)re->re.address,
+ range_str,
(unsigned long long)(re->re.address + re->re.size - 1));
}
+ fprintf(f, "\n");
write_tree_source_node(f, bi->dt, 0);
}
--
1.5.3.1.139.g9346b
^ permalink raw reply related
* [PATCH 3/4] DTC: Appease the printf() format $Gods with a correct type.
From: Jon Loeliger @ 2007-10-19 17:43 UTC (permalink / raw)
To: linuxppc-dev
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
tests/get_name.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/get_name.c b/tests/get_name.c
index 2481741..a76bdf8 100644
--- a/tests/get_name.c
+++ b/tests/get_name.c
@@ -55,7 +55,7 @@ void check_name(void *fdt, const char *path)
if (len != strlen(getname))
FAIL("fdt_get_name(%s) returned length %d instead of %d",
- path, len, strlen(getname));
+ path, len, (int) strlen(getname));
/* Now check that it doesn't break if we omit len */
getname2 = fdt_get_name(fdt, offset, NULL);
--
1.5.3.1.139.g9346b
^ permalink raw reply related
* [PATCH 2/4] DTC: Quiet a bogus "May be used uninitialized" warning.
From: Jon Loeliger @ 2007-10-19 17:42 UTC (permalink / raw)
To: linuxppc-dev
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
flattree.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/flattree.c b/flattree.c
index a26e71b..5889900 100644
--- a/flattree.c
+++ b/flattree.c
@@ -136,7 +136,7 @@ static void asm_emit_cell(void *e, cell_t val)
static void asm_emit_string(void *e, char *str, int len)
{
FILE *f = e;
- char c;
+ char c = 0;
if (len != 0) {
/* XXX: ewww */
--
1.5.3.1.139.g9346b
^ permalink raw reply related
* [PATCH 1/4] DTC: Reformat grammar rules to not mix language syntax and yacc syntax.
From: Jon Loeliger @ 2007-10-19 17:42 UTC (permalink / raw)
To: linuxppc-dev
Use consistent indenting on all rule actions.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
---
No functional changes!
dtc-parser.y | 152 +++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 118 insertions(+), 34 deletions(-)
diff --git a/dtc-parser.y b/dtc-parser.y
index 54fd787..4698793 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -79,103 +79,187 @@ extern struct boot_info *the_boot_info;
%%
-sourcefile: memreserves devicetree {
+sourcefile:
+ memreserves devicetree
+ {
the_boot_info = build_boot_info($1, $2);
}
;
-memreserves: memreserve memreserves {
+memreserves:
+ memreserve memreserves
+ {
$$ = chain_reserve_entry($1, $2);
}
- | /* empty */ {
+ | /* empty */
+ {
$$ = NULL;
}
;
-memreserve: label DT_MEMRESERVE DT_ADDR DT_ADDR ';' {
+memreserve:
+ label DT_MEMRESERVE DT_ADDR DT_ADDR ';'
+ {
$$ = build_reserve_entry($3, $4, $1);
}
- | label DT_MEMRESERVE DT_ADDR '-' DT_ADDR ';' {
+ | label DT_MEMRESERVE DT_ADDR '-' DT_ADDR ';'
+ {
$$ = build_reserve_entry($3, $5 - $3 + 1, $1);
}
;
-devicetree: '/' nodedef {
+devicetree:
+ '/' nodedef
+ {
$$ = name_node($2, "", NULL);
}
;
-nodedef: '{' proplist subnodes '}' ';' {
+nodedef:
+ '{' proplist subnodes '}' ';'
+ {
$$ = build_node($2, $3);
}
;
-proplist: propdef proplist {
+proplist:
+ propdef proplist
+ {
$$ = chain_property($1, $2);
}
- | /* empty */ {
+ | /* empty */
+ {
$$ = NULL;
}
;
-propdef: label DT_PROPNAME '=' propdata ';' {
+propdef:
+ label DT_PROPNAME '=' propdata ';'
+ {
$$ = build_property($2, $4, $1);
}
- | label DT_PROPNAME ';' {
+ | label DT_PROPNAME ';'
+ {
$$ = build_property($2, empty_data, $1);
}
;
-propdata: propdataprefix DT_STRING { $$ = data_merge($1, $2); }
- | propdataprefix '<' celllist '>' {
- $$ = data_merge(data_append_align($1, sizeof(cell_t)), $3);
+propdata:
+ propdataprefix DT_STRING
+ {
+ $$ = data_merge($1, $2);
+ }
+ | propdataprefix '<' celllist '>'
+ {
+ $$ = data_merge(data_append_align($1,
+ sizeof(cell_t)), $3);
+ }
+ | propdataprefix '[' bytestring ']'
+ {
+ $$ = data_merge($1, $3);
+ }
+ | propdata DT_LABEL
+ {
+ $$ = data_add_label($1, $2);
}
- | propdataprefix '[' bytestring ']' { $$ = data_merge($1, $3); }
- | propdata DT_LABEL { $$ = data_add_label($1, $2); }
;
-propdataprefix: propdata ',' { $$ = $1; }
- | propdataprefix DT_LABEL { $$ = data_add_label($1, $2); }
- | /* empty */ { $$ = empty_data; }
+propdataprefix:
+ propdata ','
+ {
+ $$ = $1;
+ }
+ | propdataprefix DT_LABEL
+ {
+ $$ = data_add_label($1, $2);
+ }
+ | /* empty */
+ {
+ $$ = empty_data;
+ }
;
opt_cell_base:
/* empty */
- { $$ = 16; }
+ {
+ $$ = 16;
+ }
| DT_BASE
;
-celllist: celllist opt_cell_base DT_CELL {
+celllist:
+ celllist opt_cell_base DT_CELL
+ {
$$ = data_append_cell($1,
cell_from_string($3, $2));
}
- | celllist DT_REF {
+ | celllist DT_REF
+ {
$$ = data_append_cell(data_add_fixup($1, $2), -1);
}
- | celllist DT_LABEL { $$ = data_add_label($1, $2); }
- | /* empty */ { $$ = empty_data; }
+ | celllist DT_LABEL
+ {
+ $$ = data_add_label($1, $2);
+ }
+ | /* empty */
+ {
+ $$ = empty_data;
+ }
;
-bytestring: bytestring DT_BYTE { $$ = data_append_byte($1, $2); }
- | bytestring DT_LABEL { $$ = data_add_label($1, $2); }
- | /* empty */ { $$ = empty_data; }
+bytestring:
+ bytestring DT_BYTE
+ {
+ $$ = data_append_byte($1, $2);
+ }
+ | bytestring DT_LABEL
+ {
+ $$ = data_add_label($1, $2);
+ }
+ | /* empty */
+ {
+ $$ = empty_data;
+ }
;
-subnodes: subnode subnodes {
+subnodes:
+ subnode subnodes
+ {
$$ = chain_node($1, $2);
}
- | /* empty */ { $$ = NULL; }
+ | /* empty */
+ {
+ $$ = NULL;
+ }
;
-subnode: label nodename nodedef { $$ = name_node($3, $2, $1); }
+subnode:
+ label nodename nodedef
+ {
+ $$ = name_node($3, $2, $1);
+ }
;
-nodename: DT_NODENAME { $$ = $1; }
- | DT_PROPNAME { $$ = $1; }
+nodename:
+ DT_NODENAME
+ {
+ $$ = $1;
+ }
+ | DT_PROPNAME
+ {
+ $$ = $1;
+ }
;
-label: DT_LABEL { $$ = $1; }
- | /* empty */ { $$ = NULL; }
+label:
+ DT_LABEL
+ {
+ $$ = $1;
+ }
+ | /* empty */
+ {
+ $$ = NULL;
+ }
;
%%
--
1.5.3.1.139.g9346b
^ permalink raw reply related
* [PATCH 0/4] DTC: Introduce better DTS literal support
From: Jon Loeliger @ 2007-10-19 17:42 UTC (permalink / raw)
To: linuxppc-dev
Folks,
This 4 part patch series for the DTC has:
0001-Reformat-grammar-rules-to-not-mix-language-syntax-an.patch
0002-Quiet-a-bogus-May-be-used-uninitialized-warning.patch
0003-Appease-the-printf-format-Gods-with-a-correct-typ.patch
0004-Begin-the-path-to-sane-literals-and-expressions.patch
The first is a pure whitespace formatting cleaning.
The second two clean compiler warnings.
The final one introduces a versioned DTS file with
support for C-like literals.
dtc-lexer.l | 180 ++++++++++++++++++++++++++++--------
dtc-parser.y | 275 ++++++++++++++++++++++++++++++++++++++++--------------
dtc.c | 26 +++++
dtc.h | 23 ++++-
flattree.c | 2 +-
srcpos.h | 1 +
tests/get_name.c | 2 +-
treesource.c | 24 ++++-
8 files changed, 413 insertions(+), 120 deletions(-)
Thanks,
jdl
^ permalink raw reply
* Re: powerpc 440 monitor program
From: Olof Johansson @ 2007-10-19 16:45 UTC (permalink / raw)
To: Bai Shuwei; +Cc: linuxppc-dev, linuxppc-embedded
In-Reply-To: <f3566d60710182032h69e2d2bejafd96f18dae95829@mail.gmail.com>
On Fri, Oct 19, 2007 at 11:32:33AM +0800, Bai Shuwei wrote:
> all,
> hi, when I boot my system, there are no output on the screen.
> I choice the framebuffer and my monitor card is ATI PAGE 128 PCI, qt/e GUI.
> When i compile the kernel, the boot logo and aty 128fb has be compiled into
> kernel patched with videoboot, and x86emu. The video parameters set:
> video=aty128fb:640x480-16@7.
> The kenel can recognize the monitor card, and the frame buffer device
> has run.
> The output showed below:
>
> videoboot: Booting PCI video card bus 0, function 0, device 6
> aty128fb: Found Intel x86 BIOS ROM Image
> aty128fb: Rage128 BIOS located
> aty128fb: Rage128 RK PCI [chip rev 0x2] 32M 64-bit SDR SGRAM (2:1)
> fb0: ATY Rage128 frame buffer device on Rage128 RK PCI
>
> My problem is there is no output on the monitor,and cannot see the penguin
> boot logo.
> I also run a program to test the framebuffer, which can read data from the
> fb. After running the qt/e program, which can run scussessfully, there is no
> output.!
Hi,
Lots of graphics cards need their on-board BIOS to be executed to setup
the card before it can be used by linux or anything else. Some firmwares
have x86 emulation built-in to do this (CFE has it, SLOF might, U-boot
has it for some platforms but I don't know about 4xx).
-Olof
^ permalink raw reply
* Re: [PATCH] ppc44x: support for 256K PAGE_SIZE
From: Josh Boyer @ 2007-10-19 16:36 UTC (permalink / raw)
To: Yuri Tikhonov; +Cc: linuxppc-dev
In-Reply-To: <200710181108.19413.yur@emcraft.com>
On Thu, 18 Oct 2007 11:08:19 +0400
Yuri Tikhonov <yur@emcraft.com> wrote:
>
> Hello,
>
> The following patch adds support for 256KB PAGE_SIZE on ppc44x-based boards.
> The applications to be run on the kernel with 256KB PAGE_SIZE have to be
> built using the modified version of binutils, where the MAXPAGESIZE
> definition is set to 0x40000 (as opposite to standard 0x10000).
>
> Signed-off-by: Pavel Kolesnikov <concord@emcraft.com>
> Acked-by: Yuri Tikhonov <yur@emcraft.com>
>
> --
>
> diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
> index c590b18..0ee372d 100644
> --- a/arch/ppc/Kconfig
> +++ b/arch/ppc/Kconfig
> @@ -1223,6 +1223,9 @@ config PPC_PAGE_16K
>
> config PPC_PAGE_64K
> bool "64 KB" if 44x
> +
> +config PPC_PAGE_256K
> + bool "256 KB" if 44x
> endchoice
BTW, what tree did you base this on? I don't seem to have the
PPC_PAGE_* options in my tree.
josh
^ permalink raw reply
* Re: [PATCH] ppc44x: support for 256K PAGE_SIZE
From: Yuri Tikhonov @ 2007-10-19 16:03 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <D3506DCC-01F5-48C1-900D-2D827AB6BE19@kernel.crashing.org>
On Friday 19 October 2007 19:48, Kumar Gala wrote:
> > PAGE_SIZE = 4K:
> > P = 66 MBps;
> >
> > PAGE_SIZE = 16K:
> > P = 145 MBps;
> >
> > PAGE_SIZE = 64K:
> > P = 196 MBps;
> >
> > PAGE_SIZE = 256K:
> > P = 217 MBps.
>
> Is this all in kernel space? or is there a user space aspect to the
> benchmark?
The situation here is that the Linux RAID driver does a lot of complex things
with the pages (strips of array) using CPU before submitting these pages to h/w.
Here is where the most time is spent. Thus, increasing the PAGE_SIZE value we reduce
the number of these complex algorithms calls needed to process the whole test (writing
the fixed number of MBytes to RAID array). So, there are no user space aspects.
--
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com
^ permalink raw reply
* RE: powerpc 440 monitor program
From: Leonid @ 2007-10-19 15:51 UTC (permalink / raw)
To: David Gibson, Bai Shuwei; +Cc: linuxppc-dev, linuxppc-embedded
In-Reply-To: <20071019034904.GA4407@localhost.localdomain>
In order to achieve your goal you must do at least following things:
1) enable FRAMEBUFFER_CONSOLE option in the kernel.
2) Upon reboot make getty for the monitor terminal device (could be
tty1, but you must check).
You may add line to your inittab file
tty1::respawn:/sbin/getty 38400 tty1
Speed parameter is irrelevant and may not be needed for your getty
version.
3) To see the penguin logo you must also enable one of BOOT_LOGO defines
in kernel.
Of course I assume that framebuffer is working in your system. You may
try to check it by typing "cat /dev/zero > /dev/fb0". Terminal must be
cleaned then.
You also can try "dirty" hack to ensure framebuffer functionality. Type:
sh > /dev/tty1 2>&1 < /dev/tty1
You must get prompt on monitor (your serial will hang) and if you have
working (USB?) keyboard, you will be able to use monitor.
Thanks,
Leonid.
-----Original Message-----
From: linuxppc-embedded-bounces+leonid=3Da-k-a.net@ozlabs.org
[mailto:linuxppc-embedded-bounces+leonid=3Da-k-a.net@ozlabs.org] On =
Behalf
Of David Gibson
Sent: Thursday, October 18, 2007 8:49 PM
To: Bai Shuwei
Cc: linuxppc-dev@ozlabs.org; linuxppc-embedded@ozlabs.org
Subject: Re: powerpc 440 monitor program
On Fri, Oct 19, 2007 at 11:32:33AM +0800, Bai Shuwei wrote:
> all,
> hi, when I boot my system, there are no output on the screen.
> I choice the framebuffer and my monitor card is ATI PAGE 128 PCI, qt/e
GUI.
> When i compile the kernel, the boot logo and aty 128fb has be compiled
into
> kernel patched with videoboot, and x86emu. The video parameters set:
> video=3Daty128fb:640x480-16@7.
> The kenel can recognize the monitor card, and the frame buffer
device
> has run.
> The output showed below:
>=20
> videoboot: Booting PCI video card bus 0, function 0, device 6
> aty128fb: Found Intel x86 BIOS ROM Image
> aty128fb: Rage128 BIOS located
> aty128fb: Rage128 RK PCI [chip rev 0x2] 32M 64-bit SDR SGRAM (2:1)
> fb0: ATY Rage128 frame buffer device on Rage128 RK PCI
>=20
> My problem is there is no output on the monitor,and cannot see the
penguin
> boot logo.
Uh.. most 440 systems use a serial console. It ought in theory to be
possible to use a framebuffer instead, but it wouldn't surprise me if
rather a lot of debugging was necessary.
--=20
David Gibson | I'll have my music baroque, and my
code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_
_other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* Re: qe: add ability to upload QE firmware
From: Timur Tabi @ 2007-10-19 15:56 UTC (permalink / raw)
To: Jerry Van Baren; +Cc: linuxppc-dev
In-Reply-To: <4717DEE8.9010508@gmail.com>
Jerry Van Baren wrote:
>> +/*
>> + * Download a microcode to the I-RAM at a specific address.
> ^^^^^^^^
>> + *
>> + * @firmware: pointer to qe_firmware structure
>> + */
>> +int qe_upload_microcode(const struct qe_firmware *firmware)
> ^^^^^^
> We seem to be a little conflicted over whether it is an upload or a
> download. ;-)
Oh, now I see what you're talking about. Duh.
^ permalink raw reply
* Re: [PATCH] ppc44x: support for 256K PAGE_SIZE
From: Kumar Gala @ 2007-10-19 15:48 UTC (permalink / raw)
To: Yuri Tikhonov; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <200710191937.23638.yur@emcraft.com>
On Oct 19, 2007, at 10:37 AM, Yuri Tikhonov wrote:
> On Friday 19 October 2007 03:21, Paul Mackerras wrote:
>> Have you measured the performance using a 64kB page size? If so, how
>> does it compare with the 256kB page size?
>
> I measured the performance of the sequential full-stripe write
> operations to
> a RAID-5 array (P values below are in MB per second) using the h/w
> accelerated
> RAID-5 driver.
>
> Here are the comparative results for the different PAGE_SIZE values:
>
> PAGE_SIZE = 4K:
> P = 66 MBps;
>
> PAGE_SIZE = 16K:
> P = 145 MBps;
>
> PAGE_SIZE = 64K:
> P = 196 MBps;
>
> PAGE_SIZE = 256K:
> P = 217 MBps.
Is this all in kernel space? or is there a user space aspect to the
benchmark?
>> The 64kB page size has the attraction that no binutils changes are
>> required.
>
> That's true, but the additional performance is an attractive thing
> too.
- k
^ permalink raw reply
* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
From: Sven Luther @ 2007-10-19 15:44 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Domen Puncer
In-Reply-To: <fa686aa40710190843l15d37ebdk71cd6b660aa1eab8@mail.gmail.com>
On Fri, Oct 19, 2007 at 09:43:38AM -0600, Grant Likely wrote:
> On 10/19/07, Sven Luther <sven@powerlinux.fr> wrote:
> > On Fri, Oct 19, 2007 at 07:09:16AM -0600, Grant Likely wrote:
> > > On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > > > On 17/10/07 10:36 -0600, Grant Likely wrote:
> > > > > From: Grant Likely <grant.likely@secretlab.ca>
> > > > >
> > > > > Only the MPC5200 needs this bug fix. MPC5200B is okay.
> > > > >
> > > > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > > > ---
> > > > >
> > > > > Sven, Domen;
> > > > >
> > > > > Can you please test this patch?
> > > >
> > > > I found no obvious problems with it on Efika (mpc5200b)
> > >
> > > Cool, I'll add it to my list of patches for Paulus to pull
> >
> > Sorry, i have not had time to test, but there is a problem with the
> > userland serial console i want to investigate. At the latest i will test
> > this on monday.
>
> Your userland serial problems are unrelated to this patch though, right?
Most definitively, sorry for the confusion.
Friendly,
Sven Luther
^ permalink raw reply
* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
From: Grant Likely @ 2007-10-19 15:43 UTC (permalink / raw)
To: Sven Luther; +Cc: linuxppc-dev, Domen Puncer
In-Reply-To: <20071019153528.GC31749@powerlinux.fr>
On 10/19/07, Sven Luther <sven@powerlinux.fr> wrote:
> On Fri, Oct 19, 2007 at 07:09:16AM -0600, Grant Likely wrote:
> > On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > > On 17/10/07 10:36 -0600, Grant Likely wrote:
> > > > From: Grant Likely <grant.likely@secretlab.ca>
> > > >
> > > > Only the MPC5200 needs this bug fix. MPC5200B is okay.
> > > >
> > > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > > ---
> > > >
> > > > Sven, Domen;
> > > >
> > > > Can you please test this patch?
> > >
> > > I found no obvious problems with it on Efika (mpc5200b)
> >
> > Cool, I'll add it to my list of patches for Paulus to pull
>
> Sorry, i have not had time to test, but there is a problem with the
> userland serial console i want to investigate. At the latest i will test
> this on monday.
Your userland serial problems are unrelated to this patch though, right?
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH v7 5/9] add documentation for SATA nodes
From: Grant Likely @ 2007-10-19 15:41 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
In-Reply-To: <1192793930-26039-6-git-send-email-leoli@freescale.com>
On 10/19/07, Li Yang <leoli@freescale.com> wrote:
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> Documentation/powerpc/booting-without-of.txt | 32 ++++++++++++++++++++++++++
> 1 files changed, 32 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
> index a96e853..8d49942 100644
> --- a/Documentation/powerpc/booting-without-of.txt
> +++ b/Documentation/powerpc/booting-without-of.txt
> @@ -2242,6 +2242,38 @@ platforms are moved over to use the flattened-device-tree model.
> available.
> For Axon: 0x0000012a
>
> + o) SATA nodes
> +
> + SATA nodes are defined to describe on-chip Serial ATA controllers.
> +
> + Required properties:
> +
> + - compatible : Should specify what this SATA controller is compatible
> + with.
> + - reg : Offset and length of the register set for the device.
> + - interrupts : <a b> where a is the interrupt number and b is a
> + field that represents an encoding of the sense and level
> + information for the interrupt. This should be encoded based on
> + the information in section 2) depending on the type of interrupt
> + controller you have.
> + - interrupt-parent : the phandle for the interrupt controller that
> + services interrupts for this device.
> +
> + Recommended properties :
> +
> + - phy-handle : Some SATA controller uses a shared SerDes PHY. This
> + property should specify the phandle of the SerDes node.
I'm not sure about this property. Does the driver need to know about
this? Will this setup ever change at runtime? It seems to me that
like GPIOs and chip selects, setting you which shared PHY goes with
which device is something that should be done at board setup time.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH] ppc44x: support for 256K PAGE_SIZE
From: Yuri Tikhonov @ 2007-10-19 15:37 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18199.60025.563689.10810@cargo.ozlabs.ibm.com>
On Friday 19 October 2007 03:21, Paul Mackerras wrote:
> Have you measured the performance using a 64kB page size? If so, how
> does it compare with the 256kB page size?
I measured the performance of the sequential full-stripe write operations to
a RAID-5 array (P values below are in MB per second) using the h/w accelerated
RAID-5 driver.
Here are the comparative results for the different PAGE_SIZE values:
PAGE_SIZE = 4K:
P = 66 MBps;
PAGE_SIZE = 16K:
P = 145 MBps;
PAGE_SIZE = 64K:
P = 196 MBps;
PAGE_SIZE = 256K:
P = 217 MBps.
> The 64kB page size has the attraction that no binutils changes are
> required.
That's true, but the additional performance is an attractive thing too.
>
> Paul.
>
--
Yuri Tikhonov, Senior Software Engineer
Emcraft Systems, www.emcraft.com
^ permalink raw reply
* Re: [PATCH v7 3/9] add Freescale SerDes PHY support
From: Grant Likely @ 2007-10-19 15:35 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, paulus
In-Reply-To: <1192793930-26039-4-git-send-email-leoli@freescale.com>
On 10/19/07, Li Yang <leoli@freescale.com> wrote:
> The SerDes(serializer/deserializer) PHY block is a new SoC block used
> in Freescale chips to support multiple serial interfaces, such as PCI
> Express, SGMII, SATA.
This looks like board setup behaviour. Shouldn't setting this up be
the responsibility firmware? And failing that, I think it should be
done directly by the platform setup function (in other words; make it
a helper function and call it at board setup time). Besides, you want
to provide guarantees that the board is setup correctly before the
device driver that uses it gets probed.
Cheers,
g.
>
> Signed-off-by: Li Yang <leoli@freescale.com>
> ---
> arch/powerpc/platforms/Kconfig | 7 ++
> arch/powerpc/sysdev/Makefile | 1 +
> arch/powerpc/sysdev/fsl_serdes.c | 195 ++++++++++++++++++++++++++++++++++++++
> 3 files changed, 203 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/sysdev/fsl_serdes.c
>
> diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
> index 229d355..5d64f84 100644
> --- a/arch/powerpc/platforms/Kconfig
> +++ b/arch/powerpc/platforms/Kconfig
> @@ -315,6 +315,13 @@ config FSL_ULI1575
> config CPM
> bool
>
> +config FSL_SERDES
> + bool
> + help
> + The SerDes(serializer/deserializer) PHY block is a new SoC block
> + used in Freescale chips to support multiple serial interfaces,
> + such as PCI Express, SGMII, SATA.
> +
> source "arch/powerpc/sysdev/bestcomm/Kconfig"
>
> endmenu
> diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
> index 99a77d7..2343ea4 100644
> --- a/arch/powerpc/sysdev/Makefile
> +++ b/arch/powerpc/sysdev/Makefile
> @@ -20,6 +20,7 @@ obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \
> mv64x60_udbg.o
> obj-$(CONFIG_RTC_DRV_CMOS) += rtc_cmos_setup.o
> obj-$(CONFIG_AXON_RAM) += axonram.o
> +obj-$(CONFIG_FSL_SERDES) += fsl_serdes.o
>
> ifeq ($(CONFIG_PPC_MERGE),y)
> obj-$(CONFIG_PPC_INDIRECT_PCI) += indirect_pci.o
> diff --git a/arch/powerpc/sysdev/fsl_serdes.c b/arch/powerpc/sysdev/fsl_serdes.c
> new file mode 100644
> index 0000000..670015d
> --- /dev/null
> +++ b/arch/powerpc/sysdev/fsl_serdes.c
> @@ -0,0 +1,195 @@
> +/*
> + * arch/powerpc/sysdev/fsl_serdes.c
> + *
> + * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
> + *
> + * Author: Li Yang <leoli@freescale.com>
> + *
> + * Freescale SerDes initialization routines
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +
> +#include <linux/stddef.h>
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/errno.h>
> +#include <linux/delay.h>
> +#include <linux/of.h>
> +#include <linux/of_platform.h>
> +
> +#include <asm/system.h>
> +#include <asm/io.h>
> +#include <asm/machdep.h>
> +
> +#define FSL_SRDSCR0_OFFS 0x0
> +#define FSL_SRDSCR0_DPP_1V2 0x00008800
> +#define FSL_SRDSCR1_OFFS 0x4
> +#define FSL_SRDSCR1_PLLBW 0x00000040
> +#define FSL_SRDSCR2_OFFS 0x8
> +#define FSL_SRDSCR2_VDD_1V2 0x00800000
> +#define FSL_SRDSCR2_SEIC_MASK 0x00001c1c
> +#define FSL_SRDSCR2_SEIC_SATA 0x00001414
> +#define FSL_SRDSCR2_SEIC_PEX 0x00001010
> +#define FSL_SRDSCR2_SEIC_SGMII 0x00000101
> +#define FSL_SRDSCR3_OFFS 0xc
> +#define FSL_SRDSCR3_KFR_SATA 0x10100000
> +#define FSL_SRDSCR3_KPH_SATA 0x04040000
> +#define FSL_SRDSCR3_SDFM_SATA_PEX 0x01010000
> +#define FSL_SRDSCR3_SDTXL_SATA 0x00000505
> +#define FSL_SRDSCR4_OFFS 0x10
> +#define FSL_SRDSCR4_PROT_SATA 0x00000808
> +#define FSL_SRDSCR4_PROT_PEX 0x00000101
> +#define FSL_SRDSCR4_PROT_SGMII 0x00000505
> +#define FSL_SRDSCR4_PLANE_X2 0x01000000
> +#define FSL_SRDSCR4_RFCKS_100 0x00000000
> +#define FSL_SRDSCR4_RFCKS_125 0x10000000
> +#define FSL_SRDSCR4_RFCKS_150 0x30000000
> +#define FSL_SRDSRSTCTL_OFFS 0x20
> +#define FSL_SRDSRSTCTL_RST 0x80000000
> +#define FSL_SRDSRSTCTL_SATA_RESET 0xf
> +
> +static int fsl_serdes_probe(struct of_device *ofdev,
> + const struct of_device_id *match)
> +{
> + struct device_node *np = ofdev->node;
> + void __iomem *regs;
> + const char *prot;
> + const unsigned int *freq;
> + u32 rfcks;
> +
> + regs = of_iomap(np, 0);
> + if (!regs)
> + return -ENOMEM;
> +
> + prot = of_get_property(np, "protocol", NULL);
> + if (!prot)
> + goto out;
> + freq = of_get_property(np, "clock", NULL);
> + if (!freq)
> + goto out;
> + switch (*freq) {
> + case 100:
> + rfcks = FSL_SRDSCR4_RFCKS_100;
> + break;
> + case 125:
> + rfcks = FSL_SRDSCR4_RFCKS_125;
> + break;
> + case 150:
> + rfcks = FSL_SRDSCR4_RFCKS_150;
> + break;
> + default:
> + printk(KERN_ERR "SerDes: Wrong frequency\n");
> + goto out;
> + }
> +
> + /* Use default prescale and counter */
> +
> + /* 1.0V corevdd */
> + if (of_get_property(np, "vdd-1v", NULL)) {
> + /* DPPE/DPPA = 0 */
> + clrbits32(regs + FSL_SRDSCR0_OFFS, FSL_SRDSCR0_DPP_1V2);
> +
> + /* VDD = 0 */
> + clrbits32(regs + FSL_SRDSCR2_OFFS, FSL_SRDSCR2_VDD_1V2);
> + }
> +
> + /* protocol specific configuration */
> + if (!strcmp(prot, "sata")) {
> + /* Set and clear reset bits */
> + setbits32(regs + FSL_SRDSRSTCTL_OFFS,
> + FSL_SRDSRSTCTL_SATA_RESET);
> + mdelay(1);
> + clrbits32(regs + FSL_SRDSRSTCTL_OFFS,
> + FSL_SRDSRSTCTL_SATA_RESET);
> +
> + /* Configure SRDSCR1 */
> + clrbits32(regs + FSL_SRDSCR1_OFFS, FSL_SRDSCR1_PLLBW);
> +
> + /* Configure SRDSCR2 */
> + clrsetbits_be32(regs + FSL_SRDSCR2_OFFS,
> + FSL_SRDSCR2_SEIC_MASK, FSL_SRDSCR2_SEIC_SATA);
> +
> + /* Configure SRDSCR3 */
> + out_be32(regs + FSL_SRDSCR3_OFFS, FSL_SRDSCR3_KFR_SATA |
> + FSL_SRDSCR3_KPH_SATA |
> + FSL_SRDSCR3_SDFM_SATA_PEX |
> + FSL_SRDSCR3_SDTXL_SATA);
> +
> + /* Configure SRDSCR4 */
> + out_be32(regs + FSL_SRDSCR4_OFFS, rfcks |
> + FSL_SRDSCR4_PROT_SATA);
> +
> + } else if (!strcmp(prot, "pcie")) {
> + /* Configure SRDSCR1 */
> + setbits32(regs + FSL_SRDSCR1_OFFS, FSL_SRDSCR1_PLLBW);
> +
> + /* Configure SRDSCR2 */
> + clrsetbits_be32(regs + FSL_SRDSCR2_OFFS, FSL_SRDSCR2_SEIC_MASK,
> + FSL_SRDSCR2_SEIC_PEX);
> +
> + /* Configure SRDSCR3 */
> + out_be32(regs + FSL_SRDSCR3_OFFS, FSL_SRDSCR3_SDFM_SATA_PEX);
> +
> + /* Configure SRDSCR4 */
> + if (of_get_property(np, "pcie-x2", NULL))
> + out_be32(regs + FSL_SRDSCR4_OFFS, rfcks |
> + FSL_SRDSCR4_PROT_PEX | FSL_SRDSCR4_PLANE_X2);
> + else
> + out_be32(regs + FSL_SRDSCR4_OFFS, rfcks |
> + FSL_SRDSCR4_PROT_PEX);
> +
> + } else if (!strcmp(prot, "sgmii")) {
> + /* Configure SRDSCR1 */
> + clrbits32(regs + FSL_SRDSCR1_OFFS, FSL_SRDSCR1_PLLBW);
> +
> + /* Configure SRDSCR2 */
> + clrsetbits_be32(regs + FSL_SRDSCR2_OFFS, FSL_SRDSCR2_SEIC_MASK,
> + FSL_SRDSCR2_SEIC_SGMII);
> +
> + /* Configure SRDSCR3 */
> + out_be32(regs + FSL_SRDSCR3_OFFS, 0);
> +
> + /* Configure SRDSCR4 */
> + out_be32(regs + FSL_SRDSCR4_OFFS, rfcks |
> + FSL_SRDSCR4_PROT_SGMII);
> +
> + } else {
> + printk(KERN_ERR "SerDes: Wrong protocol\n");
> + goto out;
> + }
> +
> + /* Do a software reset */
> + setbits32(regs + FSL_SRDSRSTCTL_OFFS, FSL_SRDSRSTCTL_RST);
> + iounmap(regs);
> +
> + dev_printk(KERN_INFO, &ofdev->dev, "Initialized as %s\n", prot);
> +
> + return 0;
> +out:
> + iounmap(regs);
> + return -EINVAL;
> +}
> +
> +static struct of_device_id fsl_serdes_match[] = {
> + {
> + .compatible = "fsl,serdes",
> + },
> + {},
> +};
> +
> +static struct of_platform_driver fsl_serdes_driver = {
> + .name = "fsl-serdes",
> + .match_table = fsl_serdes_match,
> + .probe = fsl_serdes_probe,
> +};
> +
> +static int __init fsl_serdes_init(void)
> +{
> + of_register_platform_driver(&fsl_serdes_driver);
> + return 0;
> +}
> +device_initcall(fsl_serdes_init);
> --
> 1.5.3.2.104.g41ef
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* Re: [PATCH] bestcomm: Restrict disabling of bus prefetch to original mpc5200 silicon.
From: Sven Luther @ 2007-10-19 15:35 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Domen Puncer
In-Reply-To: <fa686aa40710190609jebd4e31q9240d2ff5b4a5d47@mail.gmail.com>
On Fri, Oct 19, 2007 at 07:09:16AM -0600, Grant Likely wrote:
> On 10/19/07, Domen Puncer <domen.puncer@telargo.com> wrote:
> > On 17/10/07 10:36 -0600, Grant Likely wrote:
> > > From: Grant Likely <grant.likely@secretlab.ca>
> > >
> > > Only the MPC5200 needs this bug fix. MPC5200B is okay.
> > >
> > > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > > ---
> > >
> > > Sven, Domen;
> > >
> > > Can you please test this patch?
> >
> > I found no obvious problems with it on Efika (mpc5200b)
>
> Cool, I'll add it to my list of patches for Paulus to pull
Sorry, i have not had time to test, but there is a problem with the
userland serial console i want to investigate. At the latest i will test
this on monday.
Friendly,
Sven Luther
^ permalink raw reply
* [patch 3/4] 4xx: Enable EMAC for PPC405 Walnut board
From: Josh Boyer @ 2007-10-19 14:53 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20071019145307.978880000@linux.vnet.ibm.com>
This patch enables the ibm_newemac driver for the Walnut board. It fixes the
device tree for the walnut board to order the MAL interrupts correctly and
adds the local-mac-address property to the EMAC node. The bootwrapper is also
updated to extract the MAC address from the OpenBIOS offset where it is stored.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
arch/powerpc/boot/dts/walnut.dts | 12 +++-
arch/powerpc/boot/treeboot-walnut.c | 2
arch/powerpc/configs/walnut_defconfig | 94 +++++++++++++++++++---------------
arch/powerpc/platforms/40x/Kconfig | 1
4 files changed, 66 insertions(+), 43 deletions(-)
--- linux-2.6.orig/arch/powerpc/boot/dts/walnut.dts
+++ linux-2.6/arch/powerpc/boot/dts/walnut.dts
@@ -64,10 +64,15 @@
MAL: mcmal {
compatible = "ibm,mcmal-405gp", "ibm,mcmal";
dcr-reg = <180 62>;
- num-tx-chans = <2>;
+ num-tx-chans = <1>;
num-rx-chans = <1>;
interrupt-parent = <&UIC0>;
- interrupts = <a 4 b 4 c 4 d 4 e 4>;
+ interrupts = <
+ b 4 /* TXEOB */
+ c 4 /* RXEOB */
+ a 4 /* SERR */
+ d 4 /* TXDE */
+ e 4 /* RXDE */>;
};
POB0: opb {
@@ -118,9 +123,10 @@
compatible = "ibm,emac-405gp", "ibm,emac";
interrupt-parent = <&UIC0>;
interrupts = <9 4 f 4>;
+ local-mac-address = [000000000000]; /* Filled in by zImage */
reg = <ef600800 70>;
mal-device = <&MAL>;
- mal-tx-channel = <0 1>;
+ mal-tx-channel = <0>;
mal-rx-channel = <0>;
cell-index = <0>;
max-frame-size = <5dc>;
--- linux-2.6.orig/arch/powerpc/configs/walnut_defconfig
+++ linux-2.6/arch/powerpc/configs/walnut_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc4
-# Wed Sep 5 12:06:37 2007
+# Linux kernel version: 2.6.23
+# Thu Oct 18 12:54:18 2007
#
# CONFIG_PPC64 is not set
@@ -18,8 +18,13 @@ CONFIG_4xx=y
# CONFIG_PPC_MM_SLICES is not set
CONFIG_NOT_COHERENT_CACHE=y
CONFIG_PPC32=y
+CONFIG_WORD_SIZE=32
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_IRQ_PER_CPU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -63,6 +68,8 @@ CONFIG_POSIX_MQUEUE=y
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
@@ -83,7 +90,6 @@ CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
@@ -127,7 +133,9 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_PPC_CELL is not set
# CONFIG_PPC_CELL_NATIVE is not set
# CONFIG_PQ2ADS is not set
+# CONFIG_KILAUEA is not set
CONFIG_WALNUT=y
+# CONFIG_XILINX_VIRTEX_GENERIC_BOARD is not set
CONFIG_405GP=y
CONFIG_IBM405_ERR77=y
CONFIG_IBM405_ERR51=y
@@ -148,6 +156,10 @@ CONFIG_IBM405_ERR51=y
# Kernel options
#
# CONFIG_HIGHMEM is not set
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
@@ -169,6 +181,7 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
@@ -177,6 +190,8 @@ CONFIG_VIRT_TO_BUS=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
# CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_HIBERNATION_UP_POSSIBLE=y
CONFIG_SECCOMP=y
CONFIG_WANT_DEVICE_TREE=y
CONFIG_DEVICE_TREE="walnut.dts"
@@ -190,10 +205,6 @@ CONFIG_ZONE_DMA=y
# CONFIG_PCI_DOMAINS is not set
# CONFIG_PCI_SYSCALL is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
# CONFIG_PCCARD is not set
#
@@ -207,7 +218,7 @@ CONFIG_ZONE_DMA=y
CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
-CONFIG_TASK_SIZE=0x80000000
+CONFIG_TASK_SIZE=0xc0000000
CONFIG_CONSISTENT_START=0xff100000
CONFIG_CONSISTENT_SIZE=0x00200000
CONFIG_BOOT_LOAD=0x00400000
@@ -244,6 +255,7 @@ CONFIG_IP_PNP_BOOTP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
@@ -301,6 +313,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
#
# Generic Driver Options
#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
@@ -328,6 +341,7 @@ CONFIG_MTD_BLOCK=m
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
#
# RAM/ROM/Flash chip drivers
@@ -360,7 +374,6 @@ CONFIG_MTD_CFI_UTIL=y
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PHYSMAP is not set
CONFIG_MTD_PHYSMAP_OF=y
-# CONFIG_MTD_WALNUT is not set
# CONFIG_MTD_PLATRAM is not set
#
@@ -419,7 +432,22 @@ CONFIG_NETDEVICES=y
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
-# CONFIG_NET_ETHERNET is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+CONFIG_IBM_NEW_EMAC=y
+CONFIG_IBM_NEW_EMAC_RXB=128
+CONFIG_IBM_NEW_EMAC_TXB=64
+CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
+CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
+CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
+# CONFIG_IBM_NEW_EMAC_DEBUG is not set
+CONFIG_IBM_NEW_EMAC_ZMII=y
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
CONFIG_NETDEV_1000=y
CONFIG_NETDEV_10000=y
@@ -498,6 +526,12 @@ CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_HWMON is not set
#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set
@@ -512,16 +546,15 @@ CONFIG_LEGACY_PTY_COUNT=256
#
# Graphics support
#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-CONFIG_VIDEO_OUTPUT_CONTROL=m
-# CONFIG_FB is not set
-# CONFIG_FB_IBM_GXT4500 is not set
#
# Sound
@@ -546,19 +579,6 @@ CONFIG_USB_SUPPORT=y
# CONFIG_RTC_CLASS is not set
#
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
# Userspace I/O
#
# CONFIG_UIO is not set
@@ -610,7 +630,6 @@ CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
# CONFIG_CONFIGFS_FS is not set
#
@@ -630,10 +649,7 @@ CONFIG_CRAMFS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
@@ -659,15 +675,7 @@ CONFIG_SUNRPC=y
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
# CONFIG_NLS is not set
-
-#
-# Distributed Lock Manager
-#
# CONFIG_DLM is not set
# CONFIG_UCC_SLOW is not set
@@ -720,6 +728,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_DEBUG_STACKOVERFLOW is not set
@@ -734,6 +743,7 @@ CONFIG_FORCED_INLINING=y
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
@@ -753,6 +763,7 @@ CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_PCBC=y
# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
@@ -766,9 +777,12 @@ CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
CONFIG_CRYPTO_HW=y
+# CONFIG_PPC_CLOCK is not set
--- linux-2.6.orig/arch/powerpc/platforms/40x/Kconfig
+++ linux-2.6/arch/powerpc/platforms/40x/Kconfig
@@ -100,6 +100,7 @@ config 405GP
bool
select IBM405_ERR77
select IBM405_ERR51
+ select IBM_NEW_EMAC_ZMII
config 405EP
bool
--- linux-2.6.orig/arch/powerpc/boot/treeboot-walnut.c
+++ linux-2.6/arch/powerpc/boot/treeboot-walnut.c
@@ -109,6 +109,7 @@ static void walnut_flashsel_fixup(void)
setprop(sram, "reg", reg_sram, sizeof(reg_sram));
}
+#define WALNUT_OPENBIOS_MAC_OFF 0xfffffe0b
static void walnut_fixups(void)
{
ibm4xx_fixup_memsize();
@@ -116,6 +117,7 @@ static void walnut_fixups(void)
ibm4xx_quiesce_eth((u32 *)0xef600800, NULL);
ibm4xx_fixup_ebc_ranges("/plb/ebc");
walnut_flashsel_fixup();
+ dt_fixup_mac_addresses((u8 *) WALNUT_OPENBIOS_MAC_OFF);
}
void platform_init(void)
--
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox