Patchwork flashrom on PowerPC

login
register
about
Submitter Stefan Tauner
Date 2011-10-22 22:20:49
Message ID <201110222219.p9MMJvls001723@mail2.student.tuwien.ac.at>
Download mbox | patch
Permalink /patch/3439/
State Changes Requested
Headers show

Comments

Stefan Tauner - 2011-10-22 22:20:49
On Wed, 27 Jul 2011 18:20:19 +0200
Mattias Mattsson <vitplister@gmail.com> wrote:

> Hi all,
> 
> I was able to run flashrom under Linux on PPC (big endian) hardware
> with two small modifications in internal.c and processor_enable.c (see
> attached patch). Not sure if this is the right way to do it but it
> seems to work for me.
> 

i am resending this patch (unchanged) because patchwork did not pick it
up correctly. please do send one patch per mail only in the future
until we have something really working. :)

Patch

Index: processor_enable.c
===================================================================
--- processor_enable.c	(revision 1396)
+++ processor_enable.c	(working copy)
@@ -24,7 +24,7 @@ 
 #include "flash.h"
 #include "programmer.h"
 
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || defined(__powerpc__)
 
 int processor_flash_enable(void)
 {
Index: internal.c
===================================================================
--- internal.c	(revision 1396)
+++ internal.c	(working copy)
@@ -292,6 +292,8 @@ 
 		 "Aborting.\n");
 	return 1;
 #endif
+#elif defined(__powerpc__) || defined(__ppc__)
+	return 0;
 #else
 	/* FIXME: Remove this unconditional abort once all PCI drivers are
 	 * converted to use little-endian accesses for memory BARs.