Changeset 12579b2d in rtems
- Timestamp:
- 10/11/14 23:34:23 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 888fadaf
- Parents:
- ee2c3b6
- git-author:
- Joel Sherrill <joel.sherrill@…> (10/11/14 23:34:23)
- git-committer:
- Joel Sherrill <joel.sherrill@…> (10/13/14 15:33:17)
- Location:
- c/src/lib/libbsp/sparc
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/sparc/leon2/cchip/cchip.c
ree2c3b6 r12579b2d 93 93 94 94 /* AT697 PCI */ 95 u nsigned int bars[5];95 uint32_t bars[5]; 96 96 int bus, dev, fun; 97 97 … … 109 109 cchip1 cc1; 110 110 111 int init_pcif(void){ 112 unsigned int com1; 111 static int init_pcif(void) 112 { 113 uint32_t com1; 113 114 int i,bus,dev,fun; 114 115 pci_bridge_regs *pcib; … … 203 204 #define GAISLER_FTAHBRAM 0x50 204 205 #endif 205 int init_onboard_sram(void){ 206 static int init_onboard_sram(void) 207 { 206 208 struct ambapp_ahb_info ahb; 207 209 struct ambapp_apb_info apb; … … 242 244 } 243 245 244 int cchip1_register(void){ 246 int cchip1_register(void) 247 { 245 248 246 249 /* Init AT697 PCI Controller */ -
c/src/lib/libbsp/sparc/leon2/console/console.c
ree2c3b6 r12579b2d 27 27 * This routine transmits a character using polling. 28 28 */ 29 30 29 void console_outbyte_polled( 31 int port,32 char ch30 int port, 31 unsigned char ch 33 32 ); 34 33 … … 275 274 */ 276 275 277 s size_t console_write_support (int minor, const char *buf, size_t len)276 static ssize_t console_write_support (int minor, const char *buf, size_t len) 278 277 { 279 278 int nwrite = 0; … … 376 375 sc = rtems_termios_open (major, minor, arg, &pollCallbacks); 377 376 #endif 377 (void) sc; /* avoid set but not used warning */ 378 378 379 379 return RTEMS_SUCCESSFUL; -
c/src/lib/libbsp/sparc/leon2/console/debugputs.c
ree2c3b6 r12579b2d 22 22 #include <stdlib.h> 23 23 #include <assert.h> 24 25 /* 26 * Method is shared with console.c 27 */ 28 void console_outbyte_polled( int port, unsigned char ch ); 29 int console_inbyte_nonblocking( int port ); 24 30 25 31 /* -
c/src/lib/libbsp/sparc/leon2/include/bsp.h
ree2c3b6 r12579b2d 80 80 /* Configure GRETH driver */ 81 81 #define GRETH_SUPPORTED 82 #define GRETH_MEM_LOAD(addr) leon_r32_no_cache( addr)82 #define GRETH_MEM_LOAD(addr) leon_r32_no_cache((uintptr_t) addr) 83 83 84 84 /* … … 198 198 extern void BSP_shared_interrupt_mask(int irq); 199 199 200 /* 201 * Delat method 202 */ 203 void rtems_bsp_delay(int usecs); 200 204 #ifdef __cplusplus 201 205 } -
c/src/lib/libbsp/sparc/leon2/leon_open_eth/leon_open_eth.c
ree2c3b6 r12579b2d 29 29 * Default location of device registers 30 30 */ 31 #define OPEN_ETH_BASE_ADDRESS 0xb000000031 #define OPEN_ETH_BASE_ADDRESS ((void *)0xb0000000) 32 32 33 33 /* … … 37 37 38 38 open_eth_configuration_t leon_open_eth_configuration = { 39 OPEN_ETH_BASE_ADDRESS, 40 OPEN_ETH_VECTOR, 39 OPEN_ETH_BASE_ADDRESS, /* base address */ 40 OPEN_ETH_VECTOR, /* vector number */ 41 41 TDA_COUNT, /* number of transmit descriptors */ 42 42 RDA_COUNT, /* number of receive descriptors */ 43 0 /* 100 MHz operation */43 0 /* 100 MHz operation */ 44 44 }; 45 45 -
c/src/lib/libbsp/sparc/leon2/pci/pci.c
ree2c3b6 r12579b2d 137 137 static int 138 138 BSP_pci_read_config_dword(unsigned char bus, unsigned char slot, 139 unsigned char function, unsigned char offset, u nsigned int *val) {140 141 volatile u nsigned int data;139 unsigned char function, unsigned char offset, uint32_t *val) { 140 141 volatile uint32_t data; 142 142 143 143 if (offset & 3) return PCIBIOS_BAD_REGISTER_NUMBER; … … 172 172 BSP_pci_read_config_word(unsigned char bus, unsigned char slot, 173 173 unsigned char function, unsigned char offset, unsigned short *val) { 174 u nsigned int v;174 uint32_t v; 175 175 176 176 if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER; … … 186 186 BSP_pci_read_config_byte(unsigned char bus, unsigned char slot, 187 187 unsigned char function, unsigned char offset, unsigned char *val) { 188 u nsigned int v;188 uint32_t v; 189 189 190 190 pci_read_config_dword(bus, slot, function, offset&~3, &v); … … 198 198 static int 199 199 BSP_pci_write_config_dword(unsigned char bus, unsigned char slot, 200 unsigned char function, unsigned char offset, u nsigned int val) {200 unsigned char function, unsigned char offset, uint32_t val) { 201 201 202 202 if (offset & 3) return PCIBIOS_BAD_REGISTER_NUMBER; … … 228 228 BSP_pci_write_config_word(unsigned char bus, unsigned char slot, 229 229 unsigned char function, unsigned char offset, unsigned short val) { 230 u nsigned int v;230 uint32_t v; 231 231 232 232 if (offset & 1) return PCIBIOS_BAD_REGISTER_NUMBER; … … 243 243 BSP_pci_write_config_byte(unsigned char bus, unsigned char slot, 244 244 unsigned char function, unsigned char offset, unsigned char val) { 245 u nsigned int v;245 uint32_t v; 246 246 247 247 pci_read_config_dword(bus, slot, function, offset&~3, &v); … … 296 296 297 297 /* May not pass a 1k boundary */ 298 int dma_from_pci_1k(unsigned int addr, unsigned int paddr, unsigned char len) { 298 static int dma_from_pci_1k( 299 unsigned int addr, unsigned int paddr, unsigned char len) { 299 300 300 301 int retval = 0; … … 328 329 329 330 /* May not pass a 1k boundary */ 330 int dma_to_pci_1k(unsigned int addr, unsigned int paddr, unsigned char len) { 331 static int dma_to_pci_1k( 332 unsigned int addr, unsigned int paddr, unsigned char len) { 331 333 332 334 int retval = 0; … … 426 428 void pci_mem_enable(unsigned char bus, unsigned char slot, 427 429 unsigned char function) { 428 u nsigned int data;430 uint32_t data; 429 431 430 432 pci_read_config_dword(0, slot, function, PCI_COMMAND, &data); … … 436 438 void pci_master_enable(unsigned char bus, unsigned char slot, 437 439 unsigned char function) { 438 u nsigned int data;440 uint32_t data; 439 441 440 442 pci_read_config_dword(0, slot, function, PCI_COMMAND, &data); … … 465 467 static void pci_allocate_resources(void) { 466 468 467 u nsigned int slot, numfuncs, func, id, pos, size, tmp;469 uint32_t slot, numfuncs, func, id, pos, size, tmp; 468 470 unsigned int i, swapped, addr, dev, fn; 469 471 unsigned char header; … … 649 651 unsigned char ucHeader; 650 652 unsigned char ucMaxSubordinate; 651 u nsigned intulClass, ulDeviceID;653 uint32_t ulClass, ulDeviceID; 652 654 653 655 init_at697_pci(); -
c/src/lib/libbsp/sparc/leon2/rasta/rasta.c
ree2c3b6 r12579b2d 127 127 } 128 128 129 void rasta_interrrupt_register(void *handler, int irqno, void *arg)129 static void rasta_interrrupt_register(void *handler, int irqno, void *arg) 130 130 { 131 131 DBG("RASTA: Registering irq %d\n",irqno); … … 202 202 203 203 204 int rasta_get_gpio(struct ambapp_bus *abus, int index, struct gpio_reg **regs, 205 int *irq) 204 static int rasta_get_gpio( 205 struct ambapp_bus *abus, int index, struct gpio_reg **regs, 206 int *irq) 206 207 { 207 208 struct ambapp_apb_info dev; … … 232 233 int rasta_register(void) 233 234 { 234 u nsigned int bar0, bar1, data;235 uint32_t bar0, bar1, data; 235 236 236 237 unsigned int *page0 = NULL; -
c/src/lib/libbsp/sparc/leon2/startup/bsppredriver.c
ree2c3b6 r12579b2d 16 16 17 17 #include <bsp.h> 18 #include <bsp/bootcard.h> 18 19 19 /*20 * bsp_predriver_hook21 *22 * BSP predriver hook. Called just before drivers are initialized.23 * Is used to initialize shared interrupt handling.24 */25 20 void bsp_predriver_hook( void ) 26 21 { -
c/src/lib/libbsp/sparc/shared/can/grcan_rasta.c
ree2c3b6 r12579b2d 1 1 #include <rasta.h> 2 #include <grcan_rasta.h> 2 3 3 4 /* PCI frequency */ -
c/src/lib/libbsp/sparc/shared/spw/grspw_rasta.c
ree2c3b6 r12579b2d 1 #include <rtems.h> 2 #include <grspw_rasta.h> 3 1 4 /* Select PCI driver */ 2 5 #define GRSPW_PCI … … 75 78 #endif 76 79 77 intgrspw_rasta_interrupt_handler(unsigned int status);80 void grspw_rasta_interrupt_handler(unsigned int status); 78 81 79 82 void grspwrasta_interrupt_handler(int irq, void *pDev); … … 107 110 * v = status of the PCI/AMBA MCPU IRQ CTRL 108 111 */ 109 intgrspw_rasta_interrupt_handler(unsigned int status)112 void grspw_rasta_interrupt_handler(unsigned int status) 110 113 { 111 114 int minor; -
c/src/lib/libbsp/sparc/shared/uart/apbuart_rasta.c
ree2c3b6 r12579b2d 1 1 #undef DEBUG 2 3 #include <apbuart_rasta.h> 2 4 3 5 /* Set registered device name */
Note: See TracChangeset
for help on using the changeset viewer.