X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=board%2Fcpc45%2Fpd67290.c;h=23d87f682586ed0f21d12fa87492d2b7d458c268;hb=eeadd3fe0f3efaf020994a27d4394b02a6270e39;hp=6ca3e7bd7ab62b69574229aad08de99f8ad73c97;hpb=42868896df7eac02f67e2c52c6457c917b1542e9;p=karo-tx-uboot.git diff --git a/board/cpc45/pd67290.c b/board/cpc45/pd67290.c index 6ca3e7bd7a..23d87f6825 100644 --- a/board/cpc45/pd67290.c +++ b/board/cpc45/pd67290.c @@ -2,24 +2,7 @@ * (C) Copyright 2003-2005 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * + * SPDX-License-Identifier: GPL-2.0+ ******************************************************************** * * Lots of code copied from: @@ -225,11 +208,7 @@ static u_int cirrus_set_opts (socket_info_t * s) { cirrus_state_t *p = &s->c_state; u_int mask = 0xffff; -#if DEBUG - char buf[200]; - - memset (buf, 0, 200); -#endif + char buf[200] = {0}; if (has_ring == -1) has_ring = 1; @@ -639,7 +618,7 @@ static int i365_set_io_map (socket_info_t * s, struct pccard_io_map *io) #define HOST_TO_PCI(addr) ((addr) - 0xfe000000) #define PCI_TO_HOST(addr) ((addr) + 0xfe000000) -int i82365_init (void) +static int i82365_init (void) { u_int val; int i; @@ -699,16 +678,16 @@ int i82365_init (void) mem.map = 0; mem.flags = MAP_ATTRIB | MAP_ACTIVE; mem.speed = 300; - mem.sys_start = CFG_PCMCIA_MEM_ADDR; - mem.sys_stop = CFG_PCMCIA_MEM_ADDR + CFG_PCMCIA_MEM_SIZE - 1; + mem.sys_start = CONFIG_SYS_PCMCIA_MEM_ADDR; + mem.sys_stop = CONFIG_SYS_PCMCIA_MEM_ADDR + CONFIG_SYS_PCMCIA_MEM_SIZE - 1; mem.card_start = 0; i365_set_mem_map (&socket, &mem); mem.map = 1; mem.flags = MAP_ACTIVE; mem.speed = 300; - mem.sys_start = CFG_PCMCIA_MEM_ADDR + CFG_PCMCIA_MEM_SIZE; - mem.sys_stop = CFG_PCMCIA_MEM_ADDR + (2 * CFG_PCMCIA_MEM_SIZE) - 1; + mem.sys_start = CONFIG_SYS_PCMCIA_MEM_ADDR + CONFIG_SYS_PCMCIA_MEM_SIZE; + mem.sys_stop = CONFIG_SYS_PCMCIA_MEM_ADDR + (2 * CONFIG_SYS_PCMCIA_MEM_SIZE) - 1; mem.card_start = 0; i365_set_mem_map (&socket, &mem); @@ -719,7 +698,7 @@ int i82365_init (void) return 0; } -void i82365_exit (void) +static void i82365_exit (void) { io.map = 0; io.flags = 0; @@ -772,7 +751,7 @@ exit: return rc; } -#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) +#if defined(CONFIG_CMD_PCMCIA) int pcmcia_off (void) { printf ("Disable PCMCIA " PCMCIA_SLOT_MSG "\n"); @@ -794,8 +773,8 @@ static void i82365_dump_regions (pci_dev_t dev) { u_int tmp[2]; u_int *mem = (void *) socket.cb_phys; - u_char *cis = (void *) CFG_PCMCIA_MEM_ADDR; - u_char *ide = (void *) (CFG_ATA_BASE_ADDR + CFG_ATA_REG_OFFSET); + u_char *cis = (void *) CONFIG_SYS_PCMCIA_MEM_ADDR; + u_char *ide = (void *) (CONFIG_SYS_ATA_BASE_ADDR + CONFIG_SYS_ATA_REG_OFFSET); pci_read_config_dword (dev, 0x00, tmp + 0); pci_read_config_dword (dev, 0x80, tmp + 1);