From: Albert H. <he...@us...> - 2009-10-25 18:50:41
|
Update of /cvsroot/gc-linux/linux/arch/powerpc/include/asm In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31074/arch/powerpc/include/asm Modified Files: dma-mapping.h starlet.h udbg.h Added Files: starlet-ios.h starlet-mini.h Log Message: Merge gc-linux-v2.6.30. Index: starlet.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/include/asm/starlet.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** starlet.h 28 Mar 2009 20:44:19 -0000 1.3 --- starlet.h 25 Oct 2009 18:50:26 -0000 1.4 *************** *** 2,8 **** * arch/powerpc/include/asm/starlet.h * ! * Nintendo Wii starlet processor definitions ! * 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 --- 2,8 ---- * arch/powerpc/include/asm/starlet.h * ! * Definitions for the Starlet co-processor ! * Copyright (C) 2009 The GameCube Linux Team ! * Copyright (C) 2009 Albert Herranz * * This program is free software; you can redistribute it and/or *************** *** 13,252 **** */ ! #ifndef __ASM_POWERPC_STARLET_H ! #define __ASM_POWERPC_STARLET_H ! ! #include <linux/types.h> ! #include <linux/spinlock_types.h> ! #include <linux/platform_device.h> ! #include <linux/dmapool.h> ! #include <linux/dma-mapping.h> ! #include <linux/list.h> ! #include <linux/scatterlist.h> ! #include <linux/timer.h> ! #include <asm/rheap.h> ! ! #define STARLET_TITLE_HBC 0x0001000148415858ULL ! ! #define STARLET_EINVAL -4 ! ! #define STARLET_IPC_DMA_ALIGN 0x1f /* 32 bytes */ ! ! struct starlet_ipc_request; ! ! /* input/output heap */ ! struct starlet_ioh { ! spinlock_t lock; ! rh_info_t *rheap; ! unsigned long base_phys; ! void *base; ! size_t size; ! }; ! ! /* pseudo-scatterlist support for the input/output heap */ ! struct starlet_ioh_sg { ! void *buf; ! size_t len; ! dma_addr_t dma_addr; ! }; ! ! /* inter-process communication device abstraction */ ! struct starlet_ipc_device { ! unsigned long flags; ! ! void __iomem *io_base; ! int irq; ! ! struct dma_pool *dma_pool; /* to allocate requests */ ! struct starlet_ioh *ioh; /* to allocate special io buffers */ ! ! unsigned int random_id; ! ! spinlock_t list_lock; ! struct list_head outstanding_list; ! unsigned long nr_outstanding; ! struct list_head pending_list; ! unsigned long nr_pending; ! ! struct timer_list timer; ! ! struct starlet_ipc_request *req; /* for requests causing a ios reboot */ ! ! struct device *dev; ! }; ! ! /* iovec entry suitable for ioctlv */ ! struct starlet_iovec { ! dma_addr_t dma_addr; ! u32 dma_len; ! }; ! ! typedef int (*starlet_ipc_callback_t)(struct starlet_ipc_request *req); ! ! struct starlet_ipc_request { ! /* begin starlet firmware request format */ ! u32 cmd; /* 0x00 */ ! s32 result; /* 0x04 */ ! union { /* 0x08 */ ! s32 fd; ! u32 req_cmd; ! }; ! union { ! struct { ! dma_addr_t pathname; /* 0x0c */ ! u32 mode; /* 0x10 */ ! } open; ! struct { ! u32 request; /* 0x0c */ ! dma_addr_t ibuf; /* 0x10 */ ! u32 ilen; /* 0x14 */ ! dma_addr_t obuf; /* 0x18 */ ! u32 olen; /* 0x1c */ ! } ioctl; ! struct { ! u32 request; /* 0x0c */ ! u32 argc_in; /* 0x10 */ ! u32 argc_io; /* 0x14 */ ! dma_addr_t iovec_da; /* 0x18 */ ! } ioctlv; ! u32 argv[5]; /* 0x0c,0x10,0x14,0x18,0x1c */ ! }; ! /* end starlet firmware request format */ ! ! /* ! * A signature is used to discard bogus requests from earlier ! * IPC instances. ! */ ! unsigned int sig; ! ! dma_addr_t dma_addr; /* request dma address */ ! ! /* ioctlv related data */ ! struct starlet_iovec *iovec; ! size_t iovec_size; ! ! unsigned sgl_nents_in; ! unsigned sgl_nents_io; ! union { ! struct scatterlist *sgl_in; ! struct starlet_ioh_sg *ioh_sgl_in; ! }; ! union { ! struct scatterlist *sgl_io; ! struct starlet_ioh_sg *ioh_sgl_io; ! }; ! ! void *done_data; ! starlet_ipc_callback_t done; ! ! starlet_ipc_callback_t complete; ! ! unsigned long jiffies; - struct list_head node; /* for queueing */ ! struct starlet_ipc_device *ipc_dev; }; ! ! /* from starlet-malloc.c */ ! ! extern int starlet_malloc_lib_bootstrap(struct resource *mem); ! ! extern void *starlet_kzalloc(size_t size, gfp_t flags); ! extern void starlet_kfree(void *ptr); ! ! extern void *starlet_ioh_kzalloc(size_t size); ! extern void starlet_ioh_kfree(void *ptr); ! ! extern unsigned long starlet_ioh_virt_to_phys(void *ptr); ! ! extern void starlet_ioh_sg_init_table(struct starlet_ioh_sg *sgl, ! unsigned int nents); ! extern void starlet_ioh_sg_set_buf(struct starlet_ioh_sg *sg, ! void *buf, size_t len); ! ! #define starlet_ioh_for_each_sg(sgl, sg, nr, __i) \ ! for (__i = 0, sg = (sgl); __i < nr; __i++, sg++) ! ! extern int starlet_ioh_dma_map_sg(struct device *dev, ! struct starlet_ioh_sg *sgl, int nents, ! enum dma_data_direction direction); ! extern void starlet_ioh_dma_unmap_sg(struct device *dev, ! struct starlet_ioh_sg *sgl, int nents, ! enum dma_data_direction direction); ! /* from starlet-ipc.c */ ! ! extern struct starlet_ipc_device *starlet_ipc_get_device(void); ! ! extern struct starlet_ipc_request * ! starlet_ipc_alloc_request(struct starlet_ipc_device *ipc_dev, gfp_t flags); ! extern void starlet_ipc_free_request(struct starlet_ipc_request *req); ! ! ! extern int starlet_open(const char *pathname, int flags); ! extern int starlet_open_polled(const char *pathname, int flags, ! unsigned long usecs); ! extern int starlet_close(int fd); ! extern int starlet_close_polled(int fd, unsigned long usecs); ! ! extern int starlet_ioctl(int fd, int request, ! void *ibuf, size_t ilen, ! void *obuf, size_t olen); ! extern int starlet_ioctl_nowait(int fd, int request, ! void *ibuf, size_t ilen, ! void *obuf, size_t olen, ! starlet_ipc_callback_t callback, ! void *arg); ! extern int starlet_ioctl_polled(int fd, int request, ! void *ibuf, size_t ilen, ! void *obuf, size_t olen, unsigned long usecs); ! ! extern int starlet_ioctlv(int fd, int request, ! unsigned int nents_in, ! struct scatterlist *sgl_in, ! unsigned int nents_out, ! struct scatterlist *sgl_out); ! extern int starlet_ioctlv_nowait(int fd, int request, ! unsigned int nents_in, ! struct scatterlist *sgl_in, ! unsigned int nents_out, ! struct scatterlist *sgl_out, ! starlet_ipc_callback_t callback, ! void *arg); ! extern int starlet_ioctlv_polled(int fd, int request, ! unsigned int nents_in, ! struct scatterlist *sgl_in, ! unsigned int nents_out, ! struct scatterlist *sgl_out, ! unsigned long usecs); ! extern int starlet_ioctlv_and_reboot(int fd, int request, ! unsigned int nents_in, ! struct scatterlist *sgl_in, ! unsigned int nents_out, ! struct scatterlist *sgl_out); ! ! extern int starlet_ioh_ioctlv(int fd, int request, ! unsigned int nents_in, ! struct starlet_ioh_sg *ioh_sgl_in, ! unsigned int nents_io, ! struct starlet_ioh_sg *ioh_sgl_io); ! extern int starlet_ioh_ioctlv_nowait(int fd, int request, ! unsigned int nents_in, ! struct starlet_ioh_sg *ioh_sgl_in, ! unsigned int nents_io, ! struct starlet_ioh_sg *ioh_sgl_io, ! starlet_ipc_callback_t callback, ! void *arg); ! ! /* from starlet-es.c */ ! ! extern int starlet_es_reload_ios_and_discard(void); ! extern int starlet_es_reload_ios_and_launch(u64 title); ! ! /* from starlet-stm.c */ ! ! extern void starlet_stm_restart(void); ! extern void starlet_stm_power_off(void); ! ! #endif /* __ASM_POWERPC_STARLET_H */ --- 13,27 ---- */ ! #ifndef __STARLET_H ! #define __STARLET_H ! enum starlet_ipc_flavour { ! STARLET_IPC_IOS, ! STARLET_IPC_MINI, }; + int starlet_discover_ipc_flavour(void); + enum starlet_ipc_flavour starlet_get_ipc_flavour(void); ! #endif /* __STARLET_H */ Index: dma-mapping.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/include/asm/dma-mapping.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dma-mapping.h 25 Oct 2009 18:45:35 -0000 1.1 --- dma-mapping.h 25 Oct 2009 18:50:26 -0000 1.2 *************** *** 16,19 **** --- 16,20 ---- #include <linux/dma-attrs.h> #include <asm/io.h> + #include <asm-generic/dma-coherent.h> #define DMA_ERROR_CODE (~(dma_addr_t)0x0) Index: udbg.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/include/asm/udbg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** udbg.h 25 Oct 2009 18:45:35 -0000 1.4 --- udbg.h 25 Oct 2009 18:50:26 -0000 1.5 *************** *** 52,55 **** --- 52,56 ---- extern void __init udbg_init_40x_realmode(void); extern void __init udbg_init_cpm(void); + extern void __init udbg_init_usbgecko(void); #endif /* __KERNEL__ */ --- NEW FILE: starlet-ios.h --- /* * arch/powerpc/include/asm/starlet-ios.h * * Nintendo Wii Starlet IOS definitions * 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 * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #ifndef __STARLET_IOS_H #define __STARLET_IOS_H #include <linux/types.h> #include <linux/spinlock_types.h> #include <linux/platform_device.h> #include <linux/dmapool.h> #include <linux/dma-mapping.h> #include <linux/list.h> #include <linux/scatterlist.h> #include <linux/timer.h> #include <asm/rheap.h> #define STARLET_TITLE_HBC 0x0001000148415858ULL #define STARLET_EINVAL -4 #define STARLET_IPC_DMA_ALIGN 0x1f /* 32 bytes */ struct starlet_ipc_request; /* input/output heap */ struct starlet_ioh { spinlock_t lock; rh_info_t *rheap; unsigned long base_phys; void *base; size_t size; }; /* pseudo-scatterlist support for the input/output heap */ struct starlet_ioh_sg { void *buf; size_t len; dma_addr_t dma_addr; }; /* inter-process communication device abstraction */ struct starlet_ipc_device { unsigned long flags; void __iomem *io_base; int irq; struct dma_pool *dma_pool; /* to allocate requests */ struct starlet_ioh *ioh; /* to allocate special io buffers */ unsigned int random_id; spinlock_t list_lock; struct list_head outstanding_list; unsigned long nr_outstanding; struct list_head pending_list; unsigned long nr_pending; struct timer_list timer; struct starlet_ipc_request *req; /* for requests causing a ios reboot */ struct device *dev; }; /* iovec entry suitable for ioctlv */ struct starlet_iovec { dma_addr_t dma_addr; u32 dma_len; }; typedef int (*starlet_ipc_callback_t)(struct starlet_ipc_request *req); struct starlet_ipc_request { /* begin starlet firmware request format */ u32 cmd; /* 0x00 */ s32 result; /* 0x04 */ union { /* 0x08 */ s32 fd; u32 req_cmd; }; union { struct { dma_addr_t pathname; /* 0x0c */ u32 mode; /* 0x10 */ } open; struct { u32 request; /* 0x0c */ dma_addr_t ibuf; /* 0x10 */ u32 ilen; /* 0x14 */ dma_addr_t obuf; /* 0x18 */ u32 olen; /* 0x1c */ } ioctl; struct { u32 request; /* 0x0c */ u32 argc_in; /* 0x10 */ u32 argc_io; /* 0x14 */ dma_addr_t iovec_da; /* 0x18 */ } ioctlv; u32 argv[5]; /* 0x0c,0x10,0x14,0x18,0x1c */ }; /* end starlet firmware request format */ /* * A signature is used to discard bogus requests from earlier * IPC instances. */ unsigned int sig; dma_addr_t dma_addr; /* request dma address */ /* ioctlv related data */ struct starlet_iovec *iovec; size_t iovec_size; unsigned sgl_nents_in; unsigned sgl_nents_io; union { struct scatterlist *sgl_in; struct starlet_ioh_sg *ioh_sgl_in; }; union { struct scatterlist *sgl_io; struct starlet_ioh_sg *ioh_sgl_io; }; void *done_data; starlet_ipc_callback_t done; starlet_ipc_callback_t complete; unsigned long jiffies; struct list_head node; /* for queueing */ struct starlet_ipc_device *ipc_dev; }; /* from starlet-malloc.c */ extern int starlet_malloc_lib_bootstrap(struct resource *mem); extern void *starlet_kzalloc(size_t size, gfp_t flags); extern void starlet_kfree(void *ptr); extern void *starlet_ioh_kzalloc(size_t size); extern void starlet_ioh_kfree(void *ptr); extern unsigned long starlet_ioh_virt_to_phys(void *ptr); extern void starlet_ioh_sg_init_table(struct starlet_ioh_sg *sgl, unsigned int nents); extern void starlet_ioh_sg_set_buf(struct starlet_ioh_sg *sg, void *buf, size_t len); #define starlet_ioh_for_each_sg(sgl, sg, nr, __i) \ for (__i = 0, sg = (sgl); __i < nr; __i++, sg++) extern int starlet_ioh_dma_map_sg(struct device *dev, struct starlet_ioh_sg *sgl, int nents, enum dma_data_direction direction); extern void starlet_ioh_dma_unmap_sg(struct device *dev, struct starlet_ioh_sg *sgl, int nents, enum dma_data_direction direction); /* from starlet-ipc.c */ extern struct starlet_ipc_device *starlet_ipc_get_device(void); extern struct starlet_ipc_request * starlet_ipc_alloc_request(struct starlet_ipc_device *ipc_dev, gfp_t flags); extern void starlet_ipc_free_request(struct starlet_ipc_request *req); extern int starlet_open(const char *pathname, int flags); extern int starlet_open_polled(const char *pathname, int flags, unsigned long usecs); extern int starlet_close(int fd); extern int starlet_close_polled(int fd, unsigned long usecs); extern int starlet_ioctl(int fd, int request, void *ibuf, size_t ilen, void *obuf, size_t olen); extern int starlet_ioctl_nowait(int fd, int request, void *ibuf, size_t ilen, void *obuf, size_t olen, starlet_ipc_callback_t callback, void *arg); extern int starlet_ioctl_polled(int fd, int request, void *ibuf, size_t ilen, void *obuf, size_t olen, unsigned long usecs); extern int starlet_ioctlv(int fd, int request, unsigned int nents_in, struct scatterlist *sgl_in, unsigned int nents_out, struct scatterlist *sgl_out); extern int starlet_ioctlv_nowait(int fd, int request, unsigned int nents_in, struct scatterlist *sgl_in, unsigned int nents_out, struct scatterlist *sgl_out, starlet_ipc_callback_t callback, void *arg); extern int starlet_ioctlv_polled(int fd, int request, unsigned int nents_in, struct scatterlist *sgl_in, unsigned int nents_out, struct scatterlist *sgl_out, unsigned long usecs); extern int starlet_ioctlv_and_reboot(int fd, int request, unsigned int nents_in, struct scatterlist *sgl_in, unsigned int nents_out, struct scatterlist *sgl_out); extern int starlet_ioh_ioctlv(int fd, int request, unsigned int nents_in, struct starlet_ioh_sg *ioh_sgl_in, unsigned int nents_io, struct starlet_ioh_sg *ioh_sgl_io); extern int starlet_ioh_ioctlv_nowait(int fd, int request, unsigned int nents_in, struct starlet_ioh_sg *ioh_sgl_in, unsigned int nents_io, struct starlet_ioh_sg *ioh_sgl_io, starlet_ipc_callback_t callback, void *arg); /* from starlet-es.c */ extern int starlet_es_reload_ios_and_discard(void); extern int starlet_es_reload_ios_and_launch(u64 title); /* from starlet-stm.c */ extern void starlet_stm_restart(void); extern void starlet_stm_power_off(void); #endif /* __STARLET_IOS_H */ --- NEW FILE: starlet-mini.h --- /* * arch/powerpc/include/asm/starlet-mini.h * * Definitions for the 'mini' firmware replacement for Starlet * Copyright (C) 2009 The GameCube Linux Team * Copyright (C) 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 * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #ifndef __STARLET_MINI_H #define __STARLET_MINI_H #ifdef CONFIG_STARLET_MINI /* * mini ipc call numbering scheme */ #define _MIPC_FAST 0x01 #define _MIPC_SLOW 0x00 #define _MIPC_DEV_SYS 0x00 #define _MIPC_DEV_NAND 0x01 #define _MIPC_DEV_SDHC 0x02 #define _MIPC_DEV_KEYS 0x03 #define _MIPC_DEV_AES 0x04 #define _MIPC_DEV_BOOT2 0x05 #define _MIPC_DEV_PPC 0x06 #define _MIPC_DEV_SDMMC 0x07 #define _MIPC_SYS_PING 0x0000 #define _MIPC_SYS_JUMP 0x0001 #define _MIPC_SYS_GETVERS 0x0002 #define _MIPC_SYS_GETGITS 0x0003 #define _MIPC_SYS_WRITE32 0x0100 #define _MIPC_SYS_WRITE16 0x0101 #define _MIPC_SYS_WRITE8 0x0102 #define _MIPC_SYS_READ32 0x0103 #define _MIPC_SYS_READ16 0x0104 #define _MIPC_SYS_READ8 0x0105 #define _MIPC_SYS_SET32 0x0106 #define _MIPC_SYS_SET16 0x0107 #define _MIPC_SYS_SET8 0x0108 #define _MIPC_SYS_CLEAR32 0x0109 #define _MIPC_SYS_CLEAR16 0x010a #define _MIPC_SYS_CLEAR8 0x010b #define _MIPC_SYS_MASK32 0x010c #define _MIPC_SYS_MASK16 0x010d #define _MIPC_SYS_MASK8 0x010e #define _MIPC_NAND_RESET 0x0000 #define _MIPC_NAND_GETID 0x0001 #define _MIPC_NAND_READ 0x0002 #define _MIPC_NAND_WRITE 0x0003 #define _MIPC_NAND_ERASE 0x0004 #define _MIPC_NAND_STATUS 0x0005 #define _MIPC_SDHC_DISCOVER 0x0000 #define _MIPC_SDHC_EXIT 0x0001 #define _MIPC_SDMMC_ACK 0x0000 #define _MIPC_SDMMC_READ 0x0001 #define _MIPC_SDMMC_WRITE 0x0002 #define _MIPC_SDMMC_STATE 0x0003 #define _MIPC_SDMMC_SIZE 0x0004 #define _MIPC_KEYS_GETOTP 0x0000 #define _MIPC_KEYS_GETEEP 0x0001 #define _MIPC_AES_RESET 0x0000 #define _MIPC_AES_SETIV 0x0001 #define _MIPC_AES_SETKEY 0x0002 #define _MIPC_AES_DECRYPT 0x0003 #define _MIPC_BOOT2_RUN 0x0000 #define _MIPC_BOOT2_TMD 0x0001 #define _MIPC_PPC_BOOT 0x0000 /* * */ #define _MIPC_MODEBITS 8 #define _MIPC_DEVBITS 8 #define _MIPC_NRBITS 16 #define _MIPC_MODEMASK ((1 << _MIPC_MODEBITS)-1) #define _MIPC_DEVMASK ((1 << _MIPC_DEVBITS)-1) #define _MIPC_NRMASK ((1 << _MIPC_NRBITS)-1) #define _MIPC_MODESHIFT (_MIPC_DEVSHIFT + _MIPC_DEVBITS) #define _MIPC_DEVSHIFT (_MIPC_NRSHIFT + _MIPC_NRBITS) #define _MIPC_NRSHIFT 0 #define _MIPC(mode, dev, nr) \ (((mode) << _MIPC_MODESHIFT) | \ ((dev) << _MIPC_DEVSHIFT) | \ ((nr) << _MIPC_NRSHIFT)) #define _MIPC_FAST_SYS(nr) _MIPC(_MIPC_FAST, _MIPC_DEV_SYS, nr) #define MIPC_SYS_PING _MIPC_FAST_SYS(_MIPC_SYS_PING) #define MIPC_SYS_WRITE32 _MIPC_FAST_SYS(_MIPC_SYS_WRITE32) #define MIPC_SYS_WRITE16 _MIPC_FAST_SYS(_MIPC_SYS_WRITE16) #define MIPC_SYS_WRITE8 _MIPC_FAST_SYS(_MIPC_SYS_WRITE8) #define MIPC_SYS_READ32 _MIPC_FAST_SYS(_MIPC_SYS_READ32) #define MIPC_SYS_READ16 _MIPC_FAST_SYS(_MIPC_SYS_READ16) #define MIPC_SYS_READ8 _MIPC_FAST_SYS(_MIPC_SYS_READ8) #define MIPC_SYS_SET32 _MIPC_FAST_SYS(_MIPC_SYS_SET32) #define MIPC_SYS_SET16 _MIPC_FAST_SYS(_MIPC_SYS_SET16) #define MIPC_SYS_SET8 _MIPC_FAST_SYS(_MIPC_SYS_SET8) #define MIPC_SYS_CLEAR32 _MIPC_FAST_SYS(_MIPC_SYS_CLEAR32) #define MIPC_SYS_CLEAR16 _MIPC_FAST_SYS(_MIPC_SYS_CLEAR16) #define MIPC_SYS_CLEAR8 _MIPC_FAST_SYS(_MIPC_SYS_CLEAR8) #define MIPC_SYS_MASK32 _MIPC_FAST_SYS(_MIPC_SYS_MASK32) #define MIPC_SYS_MASK16 _MIPC_FAST_SYS(_MIPC_SYS_MASK16) #define MIPC_SYS_MASK8 _MIPC_FAST_SYS(_MIPC_SYS_MASK8) #define MIPC_REQ_MAX_ARGS 6 struct mipc_infohdr { char magic[3]; u8 version; phys_addr_t mem2_boundary; phys_addr_t ipc_in; size_t ipc_in_size; phys_addr_t ipc_out; size_t ipc_out_size; }; struct mipc_device; struct mipc_req; extern int mipc_discover(struct mipc_infohdr **hdrp); extern u32 mipc_in_be32(const volatile u32 __iomem *addr); extern u16 mipc_in_be16(const volatile u16 __iomem *addr); extern u8 mipc_in_8(const volatile u8 __iomem *addr); extern void mipc_out_be32(const volatile u32 __iomem *addr, u32 val); extern void mipc_out_be16(const volatile u16 __iomem *addr, u16 val); extern void mipc_out_8(const volatile u8 __iomem *addr, u8 val); extern void mipc_clear_bit(int nr, volatile unsigned long *addr); extern void mipc_set_bit(int nr, volatile unsigned long *addr); extern void mipc_clrsetbits_be32(const volatile u32 __iomem *addr, u32 clear, u32 set); extern void mipc_wmb(void); extern void __iomem *mipc_ioremap(phys_addr_t addr, unsigned long size); extern void mipc_iounmap(volatile void __iomem *addr); #else struct mipc_infohdr; static inline int mipc_discover(struct mipc_infohdr **hdrp) { return -ENODEV; } #endif /* CONFIG_STARLET_MINI */ #endif /* __STARLET_MINI_H */ |