Skip to contentSkip to conversation

Replace __asm references with __asm__

PATCH New Peter Tyser 2 participants 2 messages Apr 20, 2009 – Apr 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Replace __asm references with __asm__

__asm__ follows gcc's documented syntax and is generally more common than __asm. This change is only asthetic and should not affect functionality.

---
 board/MAI/AmigaOneG3SE/enet.c      |   16 ++++++++--------
 board/MAI/AmigaOneG3SE/flash_new.c |   10 +++++-----
 board/MAI/AmigaOneG3SE/serial.c    |    6 +++---
 board/MAI/AmigaOneG3SE/via686.c    |    2 +-
 board/trab/vfd.c                   |    2 +-
 cpu/ixp/npe/IxFeatureCtrl.c        |    2 +-
 tools/updater/flash_hw.c           |   10 +++++-----
 7 files changed, 24 insertions(+), 24 deletions(-)
board/MAI/AmigaOneG3SE/enet.c +8 -8
index ac969a9..b9df55c 100644
@@ -297,50 +297,50 @@ static void eth_3com_halt(struct eth_device* dev);
 
 static inline int ETH_INL(struct eth_device* dev, u_long addr)
 {
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 	return le32_to_cpu(*(volatile u32 *)io_to_phys(addr + dev->iobase));
 }
 
 static inline int ETH_INW(struct eth_device* dev, u_long addr)
 {
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 	return le16_to_cpu(*(volatile u16 *)io_to_phys(addr + dev->iobase));
 }
 
 static inline int ETH_INB(struct eth_device* dev, u_long addr)
 {
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 	return *(volatile u8 *)io_to_phys(addr + dev->iobase);
 }
 
 static inline void ETH_OUTB(struct eth_device* dev, int command, u_long addr)
 {
 	*(volatile u8 *)io_to_phys(addr + dev->iobase) = command;
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 }
 
 static inline void ETH_OUTW(struct eth_device* dev, int command, u_long addr)
 {
 	*(volatile u16 *)io_to_phys(addr + dev->iobase) = cpu_to_le16(command);
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 }
 
 static inline void ETH_OUTL(struct eth_device* dev, int command, u_long addr)
 {
 	*(volatile u32 *)io_to_phys(addr + dev->iobase) = cpu_to_le32(command);
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 }
 
 static inline int ETH_STATUS(struct eth_device* dev)
 {
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 	return le16_to_cpu(*(volatile u16 *)io_to_phys(EL3_STATUS + dev->iobase));
 }
 
 static inline void ETH_CMD(struct eth_device* dev, int command)
 {
 	*(volatile u16 *)io_to_phys(EL3_CMD + dev->iobase) = cpu_to_le16(command);
-    __asm volatile ("eieio");
+	__asm__ volatile ("eieio");
 }
 
 /* Command register is always in the same spot in all the register windows */
board/MAI/AmigaOneG3SE/flash_new.c +5 -5
index 7b7ea16..9beb048 100644
@@ -153,14 +153,14 @@ static ulong flash_get_size (ulong addr, flash_info_t *info)
 
 	/* Write auto select command: read Manufacturer ID */
 	x[0x0555] =  0xAA;
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 	x[0x02AA] =  0x55;
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 	x[0x0555] =  0x90;
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 
 	value = x[0];
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 
 	DEBUGF("Manuf. ID @ 0x%08lx: 0x%08x\n", (ulong)addr, value);
 
@@ -186,7 +186,7 @@ static ulong flash_get_size (ulong addr, flash_info_t *info)
 	}
 
 	value = x[1];
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 
 	DEBUGF("Device ID @ 0x%08lx: 0x%08x\n", addr+1, value);
 
board/MAI/AmigaOneG3SE/serial.c +3 -3
index 88039f3..84a913e 100644
@@ -75,17 +75,17 @@ void serial_init (void)
 	/* COM_WRITE_BYTE(LINE_CONTROL, 0x83); */
 	/* COM_WRITE_BYTE(DIVISOR_LATCH_LSB, (uint8)(clock_divisor & 0xFF)); */
 	/* COM_WRITE_BYTE(DIVISOR_LATCH_MSB, (uint8)(clock_divisor >> 8)); */
-	/* __asm("eieio"); */
+	/* __asm__("eieio"); */
 
 	/*  Set 8-N-1 */
 	COM_WRITE_BYTE (LINE_CONTROL, 0x03);
-	__asm ("eieio");
+	__asm__ ("eieio");
 
 	/*  Disable FIFO */
 	COM_WRITE_BYTE (MODEM_CONTROL, 0x03);
 	COM_WRITE_BYTE (FIFO_CONTROL, 0x07);
 
-	__asm ("eieio");
+	__asm__ ("eieio");
 	serial_init_done = 1;
 }
 
board/MAI/AmigaOneG3SE/via686.c +1 -1
index 2427ce5..752a464 100644
@@ -211,7 +211,7 @@ void via_cfgfunc_via686(struct pci_controller *host, pci_dev_t dev, struct pci_c
     }
 }
 
-__asm         ("    .globl via_calibrate_time_base \n"
+__asm__       ("    .globl via_calibrate_time_base \n"
 	       "via_calibrate_time_base:	   \n"
 	       "   lis     9, 0xfe00		   \n"
 	       "   li      0, 0x00		   \n"
board/trab/vfd.c +1 -1
index eb506f3..37d3aa4 100644
@@ -369,7 +369,7 @@ int vfd_init_clocks (void)
 	gpio->PCCON = (gpio->PCCON & 0xFFFFFF00);	/* configure GPC0...GPC3 as inputs */
 	/* allow signals to settle */
 	for (i=0; i<10000; i++)	/* udelay isn't working yet@this point! */
-		__asm("NOP");
+		__asm__("NOP");
 	vfd_board_id = (~gpio->PCDAT) & 0x000F;	/* read GPC0...GPC3 port pins */
 
 	VFD_DISABLE;				/* activate blank for the vfd */
cpu/ixp/npe/IxFeatureCtrl.c +1 -1
index e02aabf..2e196a1 100644
@@ -317,7 +317,7 @@ ixFeatureCtrlProductIdRead ()
   /* Use ARM instruction to move register0 from coprocessor to ARM register */ 
     
 #ifndef __wince
-    __asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(pdId) :); 
+    __asm__("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(pdId) :);
 #else
       
 #ifndef IN_KERNEL
tools/updater/flash_hw.c +5 -5
index 8af4b45..b5058b3 100644
@@ -153,14 +153,14 @@ static ulong flash_get_size (ulong addr, flash_info_t *info)
 
 	/* Write auto select command: read Manufacturer ID */
 	x[0x0555] =  0xAA;
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 	x[0x02AA] =  0x55;
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 	x[0x0555] =  0x90;
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 
 	value = x[0];
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 
 	DEBUGF("Manuf. ID @ 0x%08lx: 0x%08x\n", (ulong)addr, value);
 
@@ -186,7 +186,7 @@ static ulong flash_get_size (ulong addr, flash_info_t *info)
 	}
 
 	value = x[1];
-	__asm volatile ("sync\n eieio");
+	__asm__ volatile ("sync\n eieio");
 
 	DEBUGF("Device ID @ 0x%08lx: 0x%08x\n", addr+1, value);
 
Signature · 1 line
1.6.2.1
#1 lore raw

PATCH 2/2 Replace __asm references with __asm__

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

__asm__ follows gcc's documented syntax and is generally more common than __asm. This change is only asthetic and should not affect functionality.

Quoted 9 lines
---
 board/MAI/AmigaOneG3SE/enet.c      |   16 ++++++++--------
 board/MAI/AmigaOneG3SE/flash_new.c |   10 +++++-----
 board/MAI/AmigaOneG3SE/serial.c    |    6 +++---
 board/MAI/AmigaOneG3SE/via686.c    |    2 +-
 board/trab/vfd.c                   |    2 +-
 cpu/ixp/npe/IxFeatureCtrl.c        |    2 +-
 tools/updater/flash_hw.c           |   10 +++++-----
 7 files changed, 24 insertions(+), 24 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 9 lines
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 at denx.de
The project was large enough and management communication poor enough
to prompt many members of the team to see themselves  as  contestants
making  brownie  points,  rather  than as builders making programming
products. Each suboptimized  his  piece  to  meet  his  targets;  few
stopped to think about the total effect on the customer.
                              - Fred Brooks, "The Mythical Man Month"