Add GPIO_BASEx depending on which CPU.

This commit is contained in:
matt 2008-10-21 18:50:25 +00:00
parent f5786a73b7
commit 518bc3b66a
2 changed files with 26 additions and 5 deletions

View File

@ -1,7 +1,7 @@
/* $Id: omap2_obio.c,v 1.4 2008/08/27 11:03:10 matt Exp $ */
/* $Id: omap2_obio.c,v 1.5 2008/10/21 18:50:25 matt Exp $ */
/* adapted from: */
/* $NetBSD: omap2_obio.c,v 1.4 2008/08/27 11:03:10 matt Exp $ */
/* $NetBSD: omap2_obio.c,v 1.5 2008/10/21 18:50:25 matt Exp $ */
/*
@ -103,7 +103,7 @@
#include "opt_omap.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.4 2008/08/27 11:03:10 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.5 2008/10/21 18:50:25 matt Exp $");
#include "locators.h"
#include "obio.h"
@ -349,11 +349,11 @@ static const struct {
bus_addr_t addr;
bool required;
} critical_devs[] = {
#if 0
{ .name = "avic", .addr = INTC_BASE, .required = true },
{ .name = "gpio1", .addr = GPIO1_BASE, .required = false },
{ .name = "gpio2", .addr = GPIO2_BASE, .required = false },
{ .name = "gpio3", .addr = GPIO3_BASE, .required = false },
#if 0
{ .name = "dmac", .addr = DMAC_BASE, .required = true },
#endif
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: omap2_obioreg.h,v 1.1 2008/08/27 11:03:10 matt Exp $ */
/* $NetBSD: omap2_obioreg.h,v 1.2 2008/10/21 18:50:25 matt Exp $ */
/*
* Copyright (c) 2007 Microsoft
@ -41,6 +41,21 @@
#define OMAP2_OBIO_1_SIZE OMAP2430_L4_WAKEUP_SIZE
#endif
#if defined(OMAP_2420)
#define GPIO1_BASE GPIO1_BASE_2420
#define GPIO2_BASE GPIO2_BASE_2420
#define GPIO3_BASE GPIO3_BASE_2420
#define GPIO4_BASE GPIO4_BASE_2420
#endif
#if defined(OMAP_2430)
#define GPIO1_BASE GPIO1_BASE_2430
#define GPIO2_BASE GPIO2_BASE_2430
#define GPIO3_BASE GPIO3_BASE_2430
#define GPIO4_BASE GPIO4_BASE_2430
#define GPIO5_BASE GPIO5_BASE_2430
#endif
#if defined(OMAP_3530)
#define OMAP2_OBIO_0_BASE OMAP3530_L4_CORE_BASE
#define OMAP2_OBIO_0_SIZE OMAP3530_L4_CORE_SIZE
@ -53,6 +68,12 @@
#define OMAP2_OBIO_3_BASE OMAP3530_L4_EMULATION_BASE
#define OMAP2_OBIO_3_SIZE OMAP3530_L4_EMULATION_SIZE
#define GPIO1_BASE GPIO1_BASE_3530
#define GPIO2_BASE GPIO2_BASE_3530
#define GPIO3_BASE GPIO3_BASE_3530
#define GPIO4_BASE GPIO4_BASE_3530
#define GPIO5_BASE GPIO5_BASE_3530
#endif
#endif /* _ARM_OMAP_OMAP2_OBIOREG_H_ */