Complete the renaming gpio -> ppcgpio for evbppc, to make room for

the MI gpio.  Internal static functions in gpio_opb.c are not
renamed here, but the softc type is renamed together with the attach
declaration data.
This commit is contained in:
he 2005-10-16 16:35:44 +00:00
parent b388366e8f
commit dffb25a969
4 changed files with 18 additions and 18 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: OPENBLOCKS200,v 1.7 2005/09/09 16:35:29 drochner Exp $
# $NetBSD: OPENBLOCKS200,v 1.8 2005/10/16 16:35:44 he Exp $
#
# GENERIC -- everything that's currently supported
#
@ -151,7 +151,7 @@ options EMAC_EVENT_COUNTERS
gpiic0 at opb? addr ? irq ? # On-chip IIC controller
iic0 at gpiic? # I2C bus
gpio0 at opb? addr ? irq ? # On-chip GPIO controller
ppcgpio0 at opb? addr ? irq ? # On-chip GPIO controller
pchb0 at plb? # PCI-Host bridges

View File

@ -1,4 +1,4 @@
# $NetBSD: OPENBLOCKS266,v 1.25 2005/08/24 19:54:50 shige Exp $
# $NetBSD: OPENBLOCKS266,v 1.26 2005/10/16 16:35:44 he Exp $
#
# GENERIC -- everything that's currently supported
#
@ -7,7 +7,7 @@ include "arch/evbppc/conf/std.obs405"
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
#ident "OPENBLOCKS266-$Revision: 1.25 $"
#ident "OPENBLOCKS266-$Revision: 1.26 $"
maxusers 32
@ -166,10 +166,10 @@ options EMAC_EVENT_COUNTERS
gpiic0 at opb? addr ? irq ? # On-chip IIC controller
iic0 at gpiic? # I2C bus
xrtc0 at iic? addr 0x6f # RTC
gpio0 at opb? addr ? irq ? # On-chip GPIO controller
obsled0 at gpio? addr 0x0c # OBS LED connected GPIO
obsled1 at gpio? addr 0x0d # OBS LED connected GPIO
obsled2 at gpio? addr 0x0e # OBS LED connected GPIO
ppcgpio0 at opb? addr ? irq ? # On-chip GPIO controller
obsled0 at ppcgpio? addr 0x0c # OBS LED connected GPIO
obsled1 at ppcgpio? addr 0x0d # OBS LED connected GPIO
obsled2 at ppcgpio? addr 0x0e # OBS LED connected GPIO
# PCI bus support
pci* at pchb?

View File

@ -1,4 +1,4 @@
# $NetBSD: files.obs405,v 1.12 2005/09/10 04:34:39 kiyohara Exp $
# $NetBSD: files.obs405,v 1.13 2005/10/16 16:35:44 he Exp $
#
# obs405-specific configuration info
@ -15,7 +15,7 @@ file arch/evbppc/obs405/obs405_autoconf.c
file arch/evbppc/obs405/obs405_machdep.c
device obsled
attach obsled at gpio
attach obsled at ppcgpio
file arch/evbppc/obs405/dev/obsled.c obsled
# Memory Disk for install kernel

View File

@ -1,4 +1,4 @@
/* $NetBSD: gpio_opb.c,v 1.2 2005/08/26 13:19:37 drochner Exp $ */
/* $NetBSD: gpio_opb.c,v 1.3 2005/10/16 16:35:44 he Exp $ */
/*
* Copyright (c) 2004 Shigeyuki Fukushima.
@ -43,7 +43,7 @@
#include <powerpc/ibm4xx/dev/gpioreg.h>
#include <powerpc/ibm4xx/dev/gpiovar.h>
struct gpio_softc {
struct ppcgpio_softc {
struct device sc_dev; /* device generic */
struct gpio_controller sc_gpio; /* GPIO controller */
u_long sc_addr; /* GPIO controller address */
@ -68,7 +68,7 @@ static void gpio_write_bit(void *, int, int, int);
static uint32_t gpio_read(void *, int);
static void gpio_write(void *, int, uint32_t);
CFATTACH_DECL(gpio, sizeof(struct gpio_softc),
CFATTACH_DECL(ppcgpio, sizeof(struct ppcgpio_softc),
gpio_match, gpio_attach, NULL, NULL);
static int
@ -85,11 +85,11 @@ static int
gpio_search(struct device *parent, struct cfdata *cf,
const int *ldesc, void *aux)
{
struct gpio_softc *sc = (void *)parent;
struct ppcgpio_softc *sc = (void *)parent;
struct gpio_attach_args gaa;
gaa.ga_tag = &sc->sc_gpio;
gaa.ga_addr = cf->cf_loc[GPIOCF_ADDR];
gaa.ga_addr = cf->cf_loc[PPCGPIOCF_ADDR];
if (config_match(parent, cf, &gaa) > 0)
config_attach(parent, cf, &gaa, gpio_print);
@ -111,7 +111,7 @@ gpio_match(struct device *parent, struct cfdata *cf, void *args)
static void
gpio_attach(struct device *parent, struct device *self, void *aux)
{
struct gpio_softc *sc = (struct gpio_softc *)self;
struct ppcgpio_softc *sc = (struct ppcgpio_softc *)self;
struct opb_attach_args *oaa = aux;
aprint_naive(": GPIO controller\n");
@ -199,7 +199,7 @@ gpio_write_bit(void *arg, int offset, int addr, int bit)
static uint32_t
gpio_read(void *arg, int offset)
{
struct gpio_softc *sc = arg;
struct ppcgpio_softc *sc = arg;
uint32_t rv;
rv = inl(sc->sc_addr + offset);
@ -210,7 +210,7 @@ gpio_read(void *arg, int offset)
static void
gpio_write(void *arg, int offset, uint32_t out)
{
struct gpio_softc *sc = arg;
struct ppcgpio_softc *sc = arg;
outl((sc->sc_addr + offset), out);
}