]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/txx9/generic.h
MIPS: TXx9: Microoptimize interrupt handlers
[linux-2.6-omap-h63xx.git] / include / asm-mips / txx9 / generic.h
index 5b1ccf901c625a99931e6ed8e6e3a34c622c3312..dc85515eac13659e2b909258ddb22fdc5d7efb3e 100644 (file)
@@ -42,9 +42,10 @@ struct txx9_board_vec {
 };
 extern struct txx9_board_vec *txx9_board_vec;
 extern int (*txx9_irq_dispatch)(int pending);
-void prom_init_cmdline(void);
 char *prom_getcmdline(void);
+const char *prom_getenv(const char *name);
 void txx9_wdt_init(unsigned long base);
+void txx9_wdt_now(unsigned long base);
 void txx9_spi_init(int busid, unsigned long base, int irq);
 void txx9_ethaddr_init(unsigned int id, unsigned char *ethaddr);
 void txx9_sio_init(unsigned long baseaddr, int irq,
@@ -59,4 +60,26 @@ static inline void txx9_sio_putchar_init(unsigned long baseaddr)
 }
 #endif
 
+struct physmap_flash_data;
+void txx9_physmap_flash_init(int no, unsigned long addr, unsigned long size,
+                            const struct physmap_flash_data *pdata);
+
+/* 8 bit version of __fls(): find first bit set (returns 0..7) */
+static inline unsigned int __fls8(unsigned char x)
+{
+       int r = 7;
+
+       if (!(x & 0xf0)) {
+               r -= 4;
+               x <<= 4;
+       }
+       if (!(x & 0xc0)) {
+               r -= 2;
+               x <<= 2;
+       }
+       if (!(x & 0x80))
+               r -= 1;
+       return r;
+}
+
 #endif /* __ASM_TXX9_GENERIC_H */