From: Albert H. <he...@us...> - 2009-02-01 18:29:46
|
Update of /cvsroot/gc-linux/linux/arch/powerpc/boot In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17186/arch/powerpc/boot Modified Files: Makefile gamecube.c ugecon.c ugecon.h wii.c Log Message: Merge 2.6.28. Also: - run checkpatch against the non-broken source code - add GPIO driver fixes - implement getgeo for the special block drivers - small fixes Index: ugecon.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/boot/ugecon.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ugecon.h 26 Mar 2008 19:45:15 -0000 1.1 +++ ugecon.h 1 Feb 2009 18:29:34 -0000 1.2 @@ -2,8 +2,8 @@ * arch/powerpc/boot/ugecon.h * * USB Gecko early bootwrapper console. - * Copyright (C) 2008 The GameCube Linux Team - * Copyright (C) 2008 Albert Herranz + * Copyright (C) 2008-2009 The GameCube Linux Team + * Copyright (C) 2008,2009 Albert Herranz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,6 +19,7 @@ extern int ug_is_adapter_present(void); extern void ug_putc(char ch); +extern void ug_console_write(const char *buf, int len); #endif /* __UGECON_H */ Index: ugecon.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/boot/ugecon.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ugecon.c 26 Mar 2008 19:45:14 -0000 1.1 +++ ugecon.c 1 Feb 2009 18:29:34 -0000 1.2 @@ -1,9 +1,9 @@ /* * arch/powerpc/boot/ugecon.c * - * USB Gecko early bootwrapper console. - * Copyright (C) 2008 The GameCube Linux Team - * Copyright (C) 2008 Albert Herranz + * USB Gecko bootwrapper console. + * Copyright (C) 2008-2009 The GameCube Linux Team + * Copyright (C) 2008,2009 Albert Herranz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -57,7 +57,7 @@ cr = EXI_CR_TLEN(2) | EXI_CR_READ_WRITE | EXI_CR_TSTART; out_be32(cr_reg, cr); - while(in_be32(cr_reg) & EXI_CR_TSTART) + while (in_be32(cr_reg) & EXI_CR_TSTART) barrier(); /* deselect */ @@ -69,7 +69,7 @@ static int ug_is_txfifo_ready(void) { - return (ug_io_transaction(0xc0000000) & 0x04000000); + return ug_io_transaction(0xc0000000) & 0x04000000; } static void ug_raw_putc(char ch) @@ -77,17 +77,28 @@ ug_io_transaction(0xb0000000 | (ch << 20)); } -void ug_putc(char ch) +static void ug_putc(char ch) { int count = 16; if (!ug_io_base) return; - while(!ug_is_txfifo_ready() && count--) - barrier(); + while (!ug_is_txfifo_ready() && count--) + barrier(); if (count) - ug_raw_putc(ch); + ug_raw_putc(ch); +} + +void ug_console_write(const char *buf, int len) +{ + char *b = (char *)buf; + + while (len--) { + if (*b == '\n') + ug_putc('\r'); + ug_putc(*b++); + } } int ug_is_adapter_present(void) @@ -95,25 +106,23 @@ if (!ug_io_base) return 0; - return (ug_io_transaction(0x90000000) == 0x04700000); + return ug_io_transaction(0x90000000) == 0x04700000; } int ug_grab_io_base(void) { - u32 v; - void *devp; + u32 v; + void *devp; - devp = finddevice("/exi/usbgecko"); - if (devp == NULL) - goto err_out; - if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) - goto err_out; + devp = finddevice("/exi/usbgecko"); + if (devp == NULL) + goto err_out; + if (getprop(devp, "virtual-reg", &v, sizeof(v)) != sizeof(v)) + goto err_out; - ug_io_base = (u8 *)v; - return 0; + ug_io_base = (u8 *)v; + return 0; err_out: - return -1; + return -1; } - - Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/boot/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 15 Nov 2008 20:10:14 -0000 1.6 +++ Makefile 1 Feb 2009 18:29:34 -0000 1.7 @@ -41,6 +41,7 @@ $(obj)/ebony.o: BOOTCFLAGS += -mcpu=405 $(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405 $(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405 +$(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405 @@ -57,6 +58,7 @@ $(addprefix libfdt/,$(src-libfdt)) libfdt-wrapper.c \ ns16550.c serial.c simple_alloc.c div64.S util.S \ gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ + 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ fsl-soc.c mpc8xx.c pq2.c ugecon.c src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ @@ -67,7 +69,7 @@ cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ - gamecube.c wii.c + cuboot-acadia.c gamecube.c wii.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) @@ -210,6 +212,7 @@ # Board ports in arch/powerpc/platform/40x/Kconfig image-$(CONFIG_EP405) += dtbImage.ep405 image-$(CONFIG_WALNUT) += treeImage.walnut +image-$(CONFIG_ACADIA) += cuImage.acadia # Board ports in arch/powerpc/platform/44x/Kconfig image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony @@ -311,12 +314,18 @@ $(obj)/vmlinux.strip: vmlinux $(STRIP) -s -R .comment $< -o $@ +# The iseries hypervisor won't take an ET_DYN executable, so this +# changes the type (byte 17) in the file to ET_EXEC (2). $(obj)/zImage.iseries: vmlinux $(STRIP) -s -R .comment $< -o $@ + printf "\x02" | dd of=$@ conv=notrunc bs=1 seek=17 $(obj)/uImage: vmlinux $(wrapperbits) $(call if_changed,wrap,uboot) +$(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) + $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) + $(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb) Index: wii.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/boot/wii.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- wii.c 13 Sep 2008 19:42:52 -0000 1.1 +++ wii.c 1 Feb 2009 18:29:34 -0000 1.2 @@ -2,8 +2,8 @@ * arch/powerpc/boot/wii.c * * Nintendo Wii platform - * Copyright (C) 2004-2008 The GameCube Linux Team - * Copyright (C) 2008 Albert Herranz + * Copyright (C) 2004-2009 The GameCube Linux Team + * Copyright (C) 2008,2009 Albert Herranz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -63,20 +63,6 @@ "); /* - * - */ -static void wii_console_write(const char *buf, int len) -{ - char *b = (char *)buf; - - while(len--) { - if (*b == '\n') - ug_putc('\r'); - ug_putc(*b++); - } -} - -/* * */ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) @@ -87,6 +73,6 @@ fdt_init(_dtb_start); if (!ug_grab_io_base() && ug_is_adapter_present()) - console_ops.write = wii_console_write; + console_ops.write = ug_console_write; } Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/boot/gamecube.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gamecube.c 13 Sep 2008 19:42:52 -0000 1.3 +++ gamecube.c 1 Feb 2009 18:29:34 -0000 1.4 @@ -2,8 +2,8 @@ * arch/powerpc/boot/gamecube.c * * Nintendo GameCube/Wii platforms - * Copyright (C) 2004-2008 The GameCube Linux Team - * Copyright (C) 2008 Albert Herranz + * Copyright (C) 2004-2009 The GameCube Linux Team + * Copyright (C) 2008,2009 Albert Herranz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -20,7 +20,6 @@ #include "ugecon.h" - BSS_STACK(8192); /* @@ -63,20 +62,6 @@ "); /* - * - */ -static void gamecube_console_write(const char *buf, int len) -{ - char *b = (char *)buf; - - while(len--) { - if (*b == '\n') - ug_putc('\r'); - ug_putc(*b++); - } -} - -/* * */ void platform_init(unsigned long r3, unsigned long r4, unsigned long r5) @@ -87,6 +72,6 @@ fdt_init(_dtb_start); if (!ug_grab_io_base() && ug_is_adapter_present()) - console_ops.write = gamecube_console_write; + console_ops.write = ug_console_write; } |