Date: Sat, 25 Oct 2008 21:27:56 GMT From: Andrew Turner <andrew@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 151919 for review Message-ID: <200810252127.m9PLRuDK031041@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151919 Change 151919 by andrew@andrew_bender on 2008/10/25 21:27:29 Add the start of a (read-only) MMC/SD driver. While here fix a typo Affected files ... .. //depot/projects/arm/src/sys/arm/s3c2xx0/files.s3c2xx0#4 edit .. //depot/projects/arm/src/sys/arm/s3c2xx0/neo1973_machdep.c#9 edit .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#17 edit .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c24x0_mci.c#1 add .. //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2xx0var.h#7 edit Differences ... ==== //depot/projects/arm/src/sys/arm/s3c2xx0/files.s3c2xx0#4 (text+ko) ==== @@ -4,6 +4,7 @@ arm/s3c2xx0/s3c2410.c standard arm/s3c2xx0/s3c2xx0_space.c standard arm/s3c2xx0/s3c24x0_clk.c standard +arm/s3c2xx0/s3c24x0_mci.c standard arm/s3c2xx0/s3c24x0_nand.c optional nand arm/s3c2xx0/uart_bus_s3c2410.c optional uart arm/s3c2xx0/uart_cpu_s3c2410.c optional uart ==== //depot/projects/arm/src/sys/arm/s3c2xx0/neo1973_machdep.c#9 (text+ko) ==== @@ -164,6 +164,16 @@ PTE_NOCACHE, }, { + /* + * Map the MMC/SD to VA == PA + */ + _A(S3C2410_SDI_BASE), + _A(S3C2410_SDI_BASE), + _S(S3C2410_SDI_SIZE), + VM_PROT_READ|VM_PROT_WRITE, + PTE_NOCACHE, + }, + { 0, 0, 0, ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2410.c#17 (text+ko) ==== @@ -307,6 +307,10 @@ if (bus_space_map(iot, S3C2410_CLKMAN_BASE, S3C24X0_CLKMAN_SIZE, 0, &sc->sc_sx.sc_clkman_ioh)) panic("cannot map clock"); + /* MMC/SD */ + if (bus_space_map(iot, S3C2410_SDI_BASE, + S3C2410_SDI_SIZE, 0, &sc->sc_sx.sc_mci_ioh)) + panic("cannot map MMC/SD"); #if 0 /* Real time clock */ @@ -339,7 +343,7 @@ rman_manage_region(&s3c2xx0_softc->s3c2xx0_irq_rman, 0, S3C2410_SUBIRQ_MAX - 1) != 0) panic("s3c2410_attach: failed to set up IRQ rman"); - /* Manage the registor memoty space */ + /* Manage the registor memory space */ if (rman_init(&s3c2xx0_softc->s3c2xx0_mem_rman) != 0 || rman_manage_region(&s3c2xx0_softc->s3c2xx0_mem_rman, S3C2410_REG_BASE, S3C2410_REG_BASE + S3C2410_REG_SIZE) != 0) @@ -348,6 +352,12 @@ s3c2410_add_child(dev, 0, "nand", 0); s3c2410_add_child(dev, 0, "timer", 0); + /* Add the MMC/SD and set it's irq/registers */ + child = s3c2410_add_child(dev, 0, "s3c24x0_mci", 0); + bus_set_resource(child, SYS_RES_IRQ, 0, S3C2410_INT_SDI, 1); + bus_set_resource(child, SYS_RES_IOPORT, 0, S3C2410_SDI_BASE, + S3C2410_SDI_SIZE); + /* Add the uart and set it's irq and registers */ child = s3c2410_add_child(dev, 0, "uart", 0); bus_set_resource(child, SYS_RES_IRQ, 0, S3C2410_INT_UART0, 1); ==== //depot/projects/arm/src/sys/arm/s3c2xx0/s3c2xx0var.h#7 (text+ko) ==== @@ -48,6 +48,7 @@ bus_space_handle_t sc_clkman_ioh; /* Clock manager */ bus_space_handle_t sc_gpio_ioh; /* GPIO */ bus_space_handle_t sc_rtc_ioh; /* real time clock */ + bus_space_handle_t sc_mci_ioh; /* MMC/SD */ bus_dma_tag_t sc_dmat;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810252127.m9PLRuDK031041>