Deleted Added
full compact
octeon_ebt3000_cf.c (242273) octeon_ebt3000_cf.c (242346)
1/***********************license start***************
2 * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
3 * reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:

--- 28 unchanged lines hidden (view full) ---

37 ***********************license end**************************************/
38
39/*
40 * octeon_ebt3000_cf.c
41 *
42 */
43
44#include <sys/cdefs.h>
1/***********************license start***************
2 * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
3 * reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:

--- 28 unchanged lines hidden (view full) ---

37 ***********************license end**************************************/
38
39/*
40 * octeon_ebt3000_cf.c
41 *
42 */
43
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sys/mips/cavium/octeon_ebt3000_cf.c 242273 2012-10-29 00:51:53Z jmallett $");
45__FBSDID("$FreeBSD: head/sys/mips/cavium/octeon_ebt3000_cf.c 242346 2012-10-30 06:36:14Z jmallett $");
46
47#include <sys/param.h>
48#include <sys/bio.h>
49#include <sys/systm.h>
50#include <sys/sysctl.h>
51#include <sys/ata.h>
52#include <sys/bus.h>
53#include <sys/kernel.h>

--- 531 unchanged lines hidden (view full) ---

585
586
587/* ------------------------------------------------------------------- *
588 * cf_probe() *
589 * ------------------------------------------------------------------- */
590
591static int cf_probe (device_t dev)
592{
46
47#include <sys/param.h>
48#include <sys/bio.h>
49#include <sys/systm.h>
50#include <sys/sysctl.h>
51#include <sys/ata.h>
52#include <sys/bus.h>
53#include <sys/kernel.h>

--- 531 unchanged lines hidden (view full) ---

585
586
587/* ------------------------------------------------------------------- *
588 * cf_probe() *
589 * ------------------------------------------------------------------- */
590
591static int cf_probe (device_t dev)
592{
593 if (octeon_is_simulation())
593 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM)
594 return (ENXIO);
595
596 if (device_get_unit(dev) != 0) {
597 panic("can't attach more devices\n");
598 }
599
600 device_set_desc(dev, "Octeon Compact Flash Driver");
601

--- 11 unchanged lines hidden (view full) ---

613 */
614static void cf_identify (driver_t *drv, device_t parent)
615{
616 int bus_region;
617 int count = 0;
618 cvmx_mio_boot_reg_cfgx_t cfg;
619 uint64_t phys_base;
620
594 return (ENXIO);
595
596 if (device_get_unit(dev) != 0) {
597 panic("can't attach more devices\n");
598 }
599
600 device_set_desc(dev, "Octeon Compact Flash Driver");
601

--- 11 unchanged lines hidden (view full) ---

613 */
614static void cf_identify (driver_t *drv, device_t parent)
615{
616 int bus_region;
617 int count = 0;
618 cvmx_mio_boot_reg_cfgx_t cfg;
619 uint64_t phys_base;
620
621 if (octeon_is_simulation())
621 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM)
622 return;
623
624 phys_base = cvmx_sysinfo_get()->compact_flash_common_base_addr;
625 base_addr = cvmx_phys_to_ptr(phys_base);
626
627 for (bus_region = 0; bus_region < 8; bus_region++)
628 {
629 cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(bus_region));

--- 59 unchanged lines hidden (view full) ---

689 * cf_attach() *
690 * ------------------------------------------------------------------- */
691
692static int cf_attach (device_t dev)
693{
694 struct cf_priv *cf_priv;
695 int error;
696
622 return;
623
624 phys_base = cvmx_sysinfo_get()->compact_flash_common_base_addr;
625 base_addr = cvmx_phys_to_ptr(phys_base);
626
627 for (bus_region = 0; bus_region < 8; bus_region++)
628 {
629 cfg.u64 = cvmx_read_csr(CVMX_MIO_BOOT_REG_CFGX(bus_region));

--- 59 unchanged lines hidden (view full) ---

689 * cf_attach() *
690 * ------------------------------------------------------------------- */
691
692static int cf_attach (device_t dev)
693{
694 struct cf_priv *cf_priv;
695 int error;
696
697 if (octeon_is_simulation())
697 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM)
698 return (ENXIO);
699
700 cf_priv = device_get_softc(dev);
701 cf_priv->dev = dev;
702
703 error = cf_cmd_identify(cf_priv);
704 if (error != 0) {
705 device_printf(dev, "cf_cmd_identify failed: %d\n", error);

--- 30 unchanged lines hidden ---
698 return (ENXIO);
699
700 cf_priv = device_get_softc(dev);
701 cf_priv->dev = dev;
702
703 error = cf_cmd_identify(cf_priv);
704 if (error != 0) {
705 device_printf(dev, "cf_cmd_identify failed: %d\n", error);

--- 30 unchanged lines hidden ---