예제 #1
0
파일: assabet.c 프로젝트: 0-T-0/ps4-linux
static void __init assabet_map_io(void)
{
	sa1100_map_io();
	iotable_init(assabet_io_desc, ARRAY_SIZE(assabet_io_desc));

	/*
	 * Set SUS bit in SDCR0 so serial port 1 functions.
	 * Its called GPCLKR0 in my SA1110 manual.
	 */
	Ser1SDCR0 |= SDCR0_SUS;
	MSC1 = (MSC1 & ~0xffff) |
		MSC_NonBrst | MSC_32BitStMem |
		MSC_RdAcc(2) | MSC_WrAcc(2) | MSC_Rec(0);

	if (!machine_has_neponset())
		sa1100_register_uart_fns(&assabet_port_fns);

	/*
	 * When Neponset is attached, the first UART should be
	 * UART3.  That's what Angel is doing and many documents
	 * are stating this.
	 *
	 * We do the Neponset mapping even if Neponset support
	 * isn't compiled in so the user will still get something on
	 * the expected physical serial port.
	 *
	 * We no longer do this; not all boot loaders support it,
	 * and UART3 appears to be somewhat unreliable with blob.
	 */
	sa1100_register_uart(0, 1);
	sa1100_register_uart(2, 3);
}
예제 #2
0
int old_pcmcia_sleeve_attach_flash(void (*set_vpp)(struct map_info *, int), unsigned long map_size)
{
        void *(*cfi_probe)(void *) = inter_module_get("cfi_probe");

	printk(" ### " __FUNCTION__ "\n");

        if (cfi_probe != NULL) {
                /* 
                 * assuming 150ns Flash, 30ns extra to cross the expansion ASIC and control logic 
                 * and 206 MHz CPU clock (4ns ns cycle time, up to 250MHz)
                 */
                unsigned long msc1_sm1_config = (MSC_NonBrst | MSC_16BitStMem 
                                                 | MSC_RdAcc((150 + 100)/4)
                                                 | MSC_NxtRdAcc((150 + 100)/4)
                                                 | MSC_Rec(100/4));
                msc1_sm1_config = 0xFFFC;
                MSC1 = ((MSC1 & 0xFFFF) /* sm0 */
                        | (msc1_sm1_config << 16));

                printk(__FUNCTION__ ": setting MSC1=0x%x\n", MSC1);

                pcmcia_sleeve_flash_map.set_vpp = set_vpp;
                pcmcia_sleeve_flash_map.size = map_size;

                pcmcia_sleeve_mtd = cfi_probe(&pcmcia_sleeve_flash_map);
                if (pcmcia_sleeve_mtd) {
                        pcmcia_sleeve_mtd->module = THIS_MODULE;
                        if ( add_mtd_partitions(pcmcia_sleeve_mtd, pcmcia_sleeve_flash_partitions, 
						NB_OF(pcmcia_sleeve_flash_partitions)))
				printk(" *** " __FUNCTION__ ": unable to add flash partitions\n");
                        printk(KERN_NOTICE "PCMCIA flash access initialized\n");
                        return 0;
                }
                return -ENXIO;
        } else {
                return -EINVAL;
        }

}