Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Support change Open-drain/Push-pull by bus_rod().
details: https://anonhg.NetBSD.org/src/rev/9dfc8487f01b
branches: trunk
changeset: 757959:9dfc8487f01b
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Thu Oct 07 12:06:09 2010 +0000
description:
Support change Open-drain/Push-pull by bus_rod().
diffstat:
sys/arch/arm/xscale/pxa2x0_mci.c | 14 ++++++++++++--
sys/dev/ic/w83l518d_sdmmc.c | 14 ++++++++++++--
sys/dev/sdmmc/sdhc.c | 19 +++++++++++++++++--
3 files changed, 41 insertions(+), 6 deletions(-)
diffs (159 lines):
diff -r 2d96c6337766 -r 9dfc8487f01b sys/arch/arm/xscale/pxa2x0_mci.c
--- a/sys/arch/arm/xscale/pxa2x0_mci.c Thu Oct 07 12:00:21 2010 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_mci.c Thu Oct 07 12:06:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pxa2x0_mci.c,v 1.6 2010/10/01 09:54:56 kiyohara Exp $ */
+/* $NetBSD: pxa2x0_mci.c,v 1.7 2010/10/07 12:06:09 kiyohara Exp $ */
/* $OpenBSD: pxa2x0_mmc.c,v 1.5 2009/02/23 18:09:55 miod Exp $ */
/*
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pxa2x0_mci.c,v 1.6 2010/10/01 09:54:56 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pxa2x0_mci.c,v 1.7 2010/10/07 12:06:09 kiyohara Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -101,6 +101,7 @@
static int pxamci_bus_power(sdmmc_chipset_handle_t, uint32_t);
static int pxamci_bus_clock(sdmmc_chipset_handle_t, int);
static int pxamci_bus_width(sdmmc_chipset_handle_t, int);
+static int pxamci_bus_rod(sdmmc_chipset_handle_t, int);
static void pxamci_exec_command(sdmmc_chipset_handle_t,
struct sdmmc_command *);
static void pxamci_card_enable_intr(sdmmc_chipset_handle_t, int);
@@ -124,6 +125,7 @@
.bus_power = pxamci_bus_power,
.bus_clock = pxamci_bus_clock,
.bus_width = pxamci_bus_width,
+ .bus_rod = pxamci_bus_rod,
/* command execution */
.exec_command = pxamci_exec_command,
@@ -548,6 +550,14 @@
return rv;
}
+static int
+pxamci_bus_rod(sdmmc_chipset_handle_t sch, int on)
+{
+
+ /* not support */
+ return -1;
+}
+
static void
pxamci_exec_command(sdmmc_chipset_handle_t sch, struct sdmmc_command *cmd)
{
diff -r 2d96c6337766 -r 9dfc8487f01b sys/dev/ic/w83l518d_sdmmc.c
--- a/sys/dev/ic/w83l518d_sdmmc.c Thu Oct 07 12:00:21 2010 +0000
+++ b/sys/dev/ic/w83l518d_sdmmc.c Thu Oct 07 12:06:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: w83l518d_sdmmc.c,v 1.2 2010/08/19 14:58:22 jmcneill Exp $ */
+/* $NetBSD: w83l518d_sdmmc.c,v 1.3 2010/10/07 12:06:09 kiyohara Exp $ */
/*
* Copyright (c) 2009 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: w83l518d_sdmmc.c,v 1.2 2010/08/19 14:58:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: w83l518d_sdmmc.c,v 1.3 2010/10/07 12:06:09 kiyohara Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -75,6 +75,7 @@
static int wb_sdmmc_bus_power(sdmmc_chipset_handle_t, uint32_t);
static int wb_sdmmc_bus_clock(sdmmc_chipset_handle_t, int);
static int wb_sdmmc_bus_width(sdmmc_chipset_handle_t, int);
+static int wb_sdmmc_bus_rod(sdmmc_chipset_handle_t, int);
static void wb_sdmmc_exec_command(sdmmc_chipset_handle_t,
struct sdmmc_command *);
static void wb_sdmmc_card_enable_intr(sdmmc_chipset_handle_t, int);
@@ -89,6 +90,7 @@
.bus_power = wb_sdmmc_bus_power,
.bus_clock = wb_sdmmc_bus_clock,
.bus_width = wb_sdmmc_bus_width,
+ .bus_rod = wb_sdmmc_bus_rod,
.exec_command = wb_sdmmc_exec_command,
.card_enable_intr = wb_sdmmc_card_enable_intr,
.card_intr_ack = wb_sdmmc_card_intr_ack,
@@ -311,6 +313,14 @@
return 0;
}
+static int
+wb_sdmmc_bus_rod(sdmmc_chipset_handle_t sch, int on)
+{
+
+ /* Not support */
+ return -1;
+}
+
static void
wb_sdmmc_rsp_read_long(struct wb_softc *wb, struct sdmmc_command *cmd)
diff -r 2d96c6337766 -r 9dfc8487f01b sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Thu Oct 07 12:00:21 2010 +0000
+++ b/sys/dev/sdmmc/sdhc.c Thu Oct 07 12:06:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.7 2010/03/27 03:04:52 nonaka Exp $ */
+/* $NetBSD: sdhc.c,v 1.8 2010/10/07 12:06:10 kiyohara Exp $ */
/* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.7 2010/03/27 03:04:52 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.8 2010/10/07 12:06:10 kiyohara Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -112,6 +112,7 @@
static int sdhc_bus_power(sdmmc_chipset_handle_t, uint32_t);
static int sdhc_bus_clock(sdmmc_chipset_handle_t, int);
static int sdhc_bus_width(sdmmc_chipset_handle_t, int);
+static int sdhc_bus_rod(sdmmc_chipset_handle_t, int);
static void sdhc_card_enable_intr(sdmmc_chipset_handle_t, int);
static void sdhc_card_intr_ack(sdmmc_chipset_handle_t);
static void sdhc_exec_command(sdmmc_chipset_handle_t,
@@ -144,6 +145,7 @@
sdhc_bus_power,
sdhc_bus_clock,
sdhc_bus_width,
+ sdhc_bus_rod,
/* command execution */
sdhc_exec_command,
@@ -630,6 +632,11 @@
*/
HSET2(hp, SDHC_CLOCK_CTL, SDHC_SDCLK_ENABLE);
+ if (freq > 25000)
+ HSET1(hp, SDHC_HOST_CTL, SDHC_HIGH_SPEED);
+ else
+ HCLR1(hp, SDHC_HOST_CTL, SDHC_HIGH_SPEED);
+
out:
mutex_exit(&hp->host_mtx);
@@ -664,6 +671,14 @@
return 0;
}
+static int
+sdhc_bus_rod(sdmmc_chipset_handle_t sch, int on)
+{
+
+ /* Nothing ?? */
+ return 0;
+}
+
static void
sdhc_card_enable_intr(sdmmc_chipset_handle_t sch, int enable)
{
Home |
Main Index |
Thread Index |
Old Index