static int omap_dsshw_probe(struct platform_device *pdev) { int r; struct omap_display_platform_data *dispdata; core.pdev = pdev; /* * Rather than receiving struct omap_dss_board_info directly in * platform_data, this function receives it within * struct omap_display_platform_data. See omap_display_init(). */ dispdata = pdev->dev.platform_data; core.pdata = dispdata->board_data; pm_runtime_enable(&pdev->dev); r = dss_get_clocks(); if (r) goto err_dss; r = dss_init(pdev); if (r) { DSSERR("Failed to initialize DSS\n"); goto err_dss; } return 0; err_dss: return r; }
void display_init(struct omap_dsi_panel *panel, void *fb, enum omap_dispc_format fmt) { dss_init(); dispc_init(); dsi_init(); udelay(10*1000); dsi_enable_panel(panel); dispc_config(panel, fb, fmt); dsi_enable_hs(); dsi_turn_on_peripheral(); dsi_send_null(); dsi_enable_videomode(panel); dispc_go(); }
static int omap_dsshw_probe(struct platform_device *pdev) { int r; pm_runtime_enable(&pdev->dev); core.pdev = pdev; r = dss_get_clocks(); if (r) goto err_dss; r = dss_init(pdev); if (r) { DSSERR("Failed to initialize DSS\n"); goto err_dss; } return 0; err_dss: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int skip_init = 0; int r; int i; core.pdev = pdev; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); /* * FIX-ME: Replace with correct clk node when clk * framework is available */ if (!cpu_is_omap44xx()) { r = dss_get_clocks(); if (r) goto fail0; } dss_clk_enable_all_no_ctx(); core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); #ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT /* DISPC_CONTROL */ if (omap_readl(0x48050440) & 1) /* LCD enabled? */ skip_init = 1; #endif r = dss_init(skip_init); if (r) { DSSERR("Failed to initialize DSS\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_RFBI r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto fail0; } #endif r = dpi_init(); if (r) { DSSERR("Failed to initialize dpi\n"); goto fail0; } r = dispc_init(); if (r) { DSSERR("Failed to initialize dispc\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_VENC r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto fail0; } #endif if (cpu_is_omap34xx()) { #ifdef CONFIG_OMAP2_DSS_SDI r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto fail0; } #endif } #ifdef CONFIG_OMAP2_DSS_DSI printk(KERN_INFO "dsi_init calling"); r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto fail0; } if (cpu_is_omap44xx()) { printk(KERN_INFO "dsi2_init calling"); r = dsi2_init(pdev); if (r) { DSSERR("Failed to initialize DSI2\n"); goto fail0; } } #endif #ifdef CONFIG_OMAP2_DSS_HDMI r = hdmi_init(pdev, hdmi_code); if (r) { DSSERR("Failed to initialize hdmi\n"); goto fail0; } #endif #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) r = dss_initialize_debugfs(); if (r) goto fail0; #endif for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) DSSERR("device reg failed %d\n", i); if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } dss_clk_disable_all(); return 0; /* XXX fail correctly */ fail0: return r; }
int main(int ac, char *av[]) { char *dir = "/"; int allflag = 0; int df_allflag = 0; int opt_cnt = 0; int maxservers = 1; /* zero allows inifinte number of threads */ int maxservers_set = 0; int logmaxservers = 0; int pid; int i; char *provider = (char *)NULL; char *df_provider = (char *)NULL; struct protob *protobp0, *protobp; NETSELDECL(proto) = NULL; NETSELDECL(df_proto) = NULL; NETSELPDECL(providerp); char *defval; boolean_t can_do_mlp; uint_t dss_npaths = 0; char **dss_pathnames = NULL; sigset_t sgset; char name[PATH_MAX], value[PATH_MAX]; int ret, bufsz; int pipe_fd = -1; MyName = *av; /* * Initializations that require more privileges than we need to run. */ (void) _create_daemon_lock(NFSD, DAEMON_UID, DAEMON_GID); svcsetprio(); can_do_mlp = priv_ineffect(PRIV_NET_BINDMLP); if (__init_daemon_priv(PU_RESETGROUPS|PU_CLEARLIMITSET, DAEMON_UID, DAEMON_GID, PRIV_SYS_NFS, can_do_mlp ? PRIV_NET_BINDMLP : NULL, NULL) == -1) { (void) fprintf(stderr, "%s should be run with" " sufficient privileges\n", av[0]); exit(1); } (void) enable_extended_FILE_stdio(-1, -1); /* * Read in the values from SMF first before we check * command line options so the options override SMF values. */ bufsz = PATH_MAX; ret = nfs_smf_get_prop("max_connections", value, DEFAULT_INSTANCE, SCF_TYPE_INTEGER, NFSD, &bufsz); if (ret == SA_OK) { errno = 0; max_conns_allowed = strtol(value, (char **)NULL, 10); if (errno != 0) max_conns_allowed = -1; } bufsz = PATH_MAX; ret = nfs_smf_get_prop("listen_backlog", value, DEFAULT_INSTANCE, SCF_TYPE_INTEGER, NFSD, &bufsz); if (ret == SA_OK) { errno = 0; listen_backlog = strtol(value, (char **)NULL, 10); if (errno != 0) { listen_backlog = 32; } } bufsz = PATH_MAX; ret = nfs_smf_get_prop("protocol", value, DEFAULT_INSTANCE, SCF_TYPE_ASTRING, NFSD, &bufsz); if ((ret == SA_OK) && strlen(value) > 0) { df_proto = strdup(value); opt_cnt++; if (strncasecmp("ALL", value, 3) == 0) { free(df_proto); df_proto = NULL; df_allflag = 1; } } bufsz = PATH_MAX; ret = nfs_smf_get_prop("device", value, DEFAULT_INSTANCE, SCF_TYPE_ASTRING, NFSD, &bufsz); if ((ret == SA_OK) && strlen(value) > 0) { df_provider = strdup(value); opt_cnt++; } bufsz = PATH_MAX; ret = nfs_smf_get_prop("servers", value, DEFAULT_INSTANCE, SCF_TYPE_INTEGER, NFSD, &bufsz); if (ret == SA_OK) { errno = 0; maxservers = strtol(value, (char **)NULL, 10); if (errno != 0) maxservers = 1; else maxservers_set = 1; } bufsz = 4; ret = nfs_smf_get_prop("server_versmin", value, DEFAULT_INSTANCE, SCF_TYPE_INTEGER, NFSD, &bufsz); if (ret == SA_OK) nfs_server_vers_min = strtol(value, (char **)NULL, 10); bufsz = 4; ret = nfs_smf_get_prop("server_versmax", value, DEFAULT_INSTANCE, SCF_TYPE_INTEGER, NFSD, &bufsz); if (ret == SA_OK) nfs_server_vers_max = strtol(value, (char **)NULL, 10); bufsz = PATH_MAX; ret = nfs_smf_get_prop("server_delegation", value, DEFAULT_INSTANCE, SCF_TYPE_ASTRING, NFSD, &bufsz); if (ret == SA_OK) if (strncasecmp(value, "off", 3) == 0) nfs_server_delegation = FALSE; /* * Conflict options error messages. */ if (opt_cnt > 1) { (void) fprintf(stderr, "\nConflicting options, only one of " "the following options can be specified\n" "in SMF:\n" "\tprotocol=ALL\n" "\tprotocol=protocol\n" "\tdevice=devicename\n\n"); usage(); } opt_cnt = 0; while ((i = getopt(ac, av, "ac:p:s:t:l:")) != EOF) { switch (i) { case 'a': free(df_proto); df_proto = NULL; free(df_provider); df_provider = NULL; allflag = 1; opt_cnt++; break; case 'c': max_conns_allowed = atoi(optarg); break; case 'p': proto = optarg; df_allflag = 0; opt_cnt++; break; /* * DSS: NFSv4 distributed stable storage. * * This is a Contracted Project Private interface, for * the sole use of Sun Cluster HA-NFS. See PSARC/2006/313. */ case 's': if (strlen(optarg) < MAXPATHLEN) { /* first "-s" option encountered? */ if (dss_pathnames == NULL) { /* * Allocate maximum possible space * required given cmdline arg count; * "-s <path>" consumes two args. */ size_t sz = (ac / 2) * sizeof (char *); dss_pathnames = (char **)malloc(sz); if (dss_pathnames == NULL) { (void) fprintf(stderr, "%s: " "dss paths malloc failed\n", av[0]); exit(1); } (void) memset(dss_pathnames, 0, sz); } dss_pathnames[dss_npaths] = optarg; dss_npaths++; } else { (void) fprintf(stderr, "%s: -s pathname too long.\n", av[0]); } break; case 't': provider = optarg; df_allflag = 0; opt_cnt++; break; case 'l': listen_backlog = atoi(optarg); break; case '?': usage(); /* NOTREACHED */ } } allflag = df_allflag; if (proto == NULL) proto = df_proto; if (provider == NULL) provider = df_provider; /* * Conflict options error messages. */ if (opt_cnt > 1) { (void) fprintf(stderr, "\nConflicting options, only one of " "the following options can be specified\n" "on the command line:\n" "\t-a\n" "\t-p protocol\n" "\t-t transport\n\n"); usage(); } if (proto != NULL && strncasecmp(proto, NC_UDP, strlen(NC_UDP)) == 0) { if (nfs_server_vers_max == NFS_V4) { if (nfs_server_vers_min == NFS_V4) { fprintf(stderr, "NFS version 4 is not supported " "with the UDP protocol. Exiting\n"); exit(3); } else { fprintf(stderr, "NFS version 4 is not supported " "with the UDP protocol.\n"); } } } /* * If there is exactly one more argument, it is the number of * servers. */ if (optind == ac - 1) { maxservers = atoi(av[optind]); maxservers_set = 1; } /* * If there are two or more arguments, then this is a usage error. */ else if (optind < ac - 1) usage(); /* * Check the ranges for min/max version specified */ else if ((nfs_server_vers_min > nfs_server_vers_max) || (nfs_server_vers_min < NFS_VERSMIN) || (nfs_server_vers_max > NFS_VERSMAX)) usage(); /* * There are no additional arguments, and we haven't set maxservers * explicitly via the config file, we use a default number of * servers. We will log this. */ else if (maxservers_set == 0) logmaxservers = 1; /* * Basic Sanity checks on options * * max_conns_allowed must be positive, except for the special * value of -1 which is used internally to mean unlimited, -1 isn't * documented but we allow it anyway. * * maxservers must be positive * listen_backlog must be positive or zero */ if (((max_conns_allowed != -1) && (max_conns_allowed <= 0)) || (listen_backlog < 0) || (maxservers <= 0)) { usage(); } /* * Set current dir to server root */ if (chdir(dir) < 0) { (void) fprintf(stderr, "%s: ", MyName); perror(dir); exit(1); } #ifndef DEBUG pipe_fd = daemonize_init(); #endif openlog(MyName, LOG_PID | LOG_NDELAY, LOG_DAEMON); /* * establish our lock on the lock file and write our pid to it. * exit if some other process holds the lock, or if there's any * error in writing/locking the file. */ pid = _enter_daemon_lock(NFSD); switch (pid) { case 0: break; case -1: fprintf(stderr, "error locking for %s: %s\n", NFSD, strerror(errno)); exit(2); default: /* daemon was already running */ exit(0); } /* * If we've been given a list of paths to be used for distributed * stable storage, and provided we're going to run a version * that supports it, setup the DSS paths. */ if (dss_pathnames != NULL && nfs_server_vers_max >= DSS_VERSMIN) { if (dss_init(dss_npaths, dss_pathnames) != 0) { fprintf(stderr, "%s", "dss_init failed. Exiting.\n"); exit(1); } } /* * Block all signals till we spawn other * threads. */ (void) sigfillset(&sgset); (void) thr_sigsetmask(SIG_BLOCK, &sgset, NULL); if (logmaxservers) { fprintf(stderr, "Number of servers not specified. Using default of %d.\n", maxservers); } /* * Make sure to unregister any previous versions in case the * user is reconfiguring the server in interesting ways. */ svc_unreg(NFS_PROGRAM, NFS_VERSION); svc_unreg(NFS_PROGRAM, NFS_V3); svc_unreg(NFS_PROGRAM, NFS_V4); svc_unreg(NFS_ACL_PROGRAM, NFS_ACL_V2); svc_unreg(NFS_ACL_PROGRAM, NFS_ACL_V3); /* * Set up kernel RPC thread pool for the NFS server. */ if (nfssvcpool(maxservers)) { fprintf(stderr, "Can't set up kernel NFS service: %s. " "Exiting.\n", strerror(errno)); exit(1); } /* * Set up blocked thread to do LWP creation on behalf of the kernel. */ if (svcwait(NFS_SVCPOOL_ID)) { fprintf(stderr, "Can't set up NFS pool creator: %s. Exiting.\n", strerror(errno)); exit(1); } /* * RDMA start and stop thread. * Per pool RDMA listener creation and * destructor thread. * * start rdma services and block in the kernel. * (only if proto or provider is not set to TCP or UDP) */ if ((proto == NULL) && (provider == NULL)) { if (svcrdma(NFS_SVCPOOL_ID, nfs_server_vers_min, nfs_server_vers_max, nfs_server_delegation)) { fprintf(stderr, "Can't set up RDMA creator thread : %s\n", strerror(errno)); } } /* * Now open up for signal delivery */ (void) thr_sigsetmask(SIG_UNBLOCK, &sgset, NULL); sigset(SIGTERM, sigflush); sigset(SIGUSR1, quiesce); /* * Build a protocol block list for registration. */ protobp0 = protobp = (struct protob *)malloc(sizeof (struct protob)); protobp->serv = "NFS"; protobp->versmin = nfs_server_vers_min; protobp->versmax = nfs_server_vers_max; protobp->program = NFS_PROGRAM; protobp->next = (struct protob *)malloc(sizeof (struct protob)); protobp = protobp->next; protobp->serv = "NFS_ACL"; /* not used */ protobp->versmin = nfs_server_vers_min; /* XXX - this needs work to get the version just right */ protobp->versmax = (nfs_server_vers_max > NFS_ACL_V3) ? NFS_ACL_V3 : nfs_server_vers_max; protobp->program = NFS_ACL_PROGRAM; protobp->next = (struct protob *)NULL; if (allflag) { if (do_all(protobp0, nfssvc) == -1) { fprintf(stderr, "setnetconfig failed : %s\n", strerror(errno)); exit(1); } } else if (proto) { /* there's more than one match for the same protocol */ struct netconfig *nconf; NCONF_HANDLE *nc; bool_t protoFound = FALSE; if ((nc = setnetconfig()) == (NCONF_HANDLE *) NULL) { fprintf(stderr, "setnetconfig failed : %s\n", strerror(errno)); goto done; } while (nconf = getnetconfig(nc)) { if (strcmp(nconf->nc_proto, proto) == 0) { protoFound = TRUE; do_one(nconf->nc_device, NULL, protobp0, nfssvc); } } (void) endnetconfig(nc); if (protoFound == FALSE) { fprintf(stderr, "couldn't find netconfig entry for protocol %s\n", proto); } } else if (provider) do_one(provider, proto, protobp0, nfssvc); else { for (providerp = defaultproviders; *providerp != NULL; providerp++) { provider = *providerp; do_one(provider, NULL, protobp0, nfssvc); } } done: free(protobp); free(protobp0); if (num_fds == 0) { fprintf(stderr, "Could not start NFS service for any protocol." " Exiting.\n"); exit(1); } end_listen_fds = num_fds; /* * nfsd is up and running as far as we are concerned. */ daemonize_fini(pipe_fd); /* * Get rid of unneeded privileges. */ __fini_daemon_priv(PRIV_PROC_FORK, PRIV_PROC_EXEC, PRIV_PROC_SESSION, PRIV_FILE_LINK_ANY, PRIV_PROC_INFO, (char *)NULL); /* * Poll for non-data control events on the transport descriptors. */ poll_for_action(); /* * If we get here, something failed in poll_for_action(). */ return (1); }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r = 0; int i; core.pdev = pdev; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); #ifdef CONFIG_HAS_EARLYSUSPEND omap_pm_set_min_bus_tput(&pdev->dev, OCP_INITIATOR_AGENT, 166 * 1000 * 4); #endif if (cpu_is_omap44xx()) dss_init_writeback(pdev); /*Write back init*/ #ifdef HWMOD if (!cpu_is_omap44xx()) { r = dss_get_clocks(); if (r) goto err_clocks; } core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); r = dss_init(pdev); if (r) { DSSERR("Failed to initialize DSS\n"); goto err_dss; } r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto err_rfbi; } r = dpi_init(pdev); if (r) { DSSERR("Failed to initialize dpi\n"); goto err_dpi; } r = dispc_init(pdev); if (r) { DSSERR("Failed to initialize dispc\n"); goto err_dispc; } r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto err_venc; } if (cpu_is_omap34xx()) { r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto err_sdi; } } if (!cpu_is_omap24xx()) { r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto err_dsi1; } if (cpu_is_omap44xx()) { r = dsi2_init(pdev); if (r) { DSSERR("Failed to initialize DSI2\n"); goto err_dsi2; } } } #ifdef CONFIG_OMAP2_DSS_HDMI r = hdmi_init(pdev); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } #endif #endif r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } #ifdef HWMOD dss_clk_disable_all(); #endif return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: #ifdef HWMOD #ifdef CONFIG_OMAP2_DSS_HDMI hdmi_exit(); err_hdmi: #endif if (cpu_is_omap44xx()) dsi2_exit(); err_dsi2: if (!cpu_is_omap24xx()) dsi_exit(); err_dsi1: if (cpu_is_omap34xx()) sdi_exit(); err_sdi: venc_exit(); err_venc: dispc_exit(); err_dispc: dpi_exit(); err_dpi: rfbi_exit(); err_rfbi: dss_exit(); err_dss: dss_clk_disable_all_no_ctx(); dss_put_clocks(); err_clocks: #endif return r; }
static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_platform_data *pdata = pdev->dev.platform_data; int r; dss.pdev = pdev; r = get_dss_clocks(); if (r) goto fail0; dss_clk_enable_all_no_ctx(); dss.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", dss.ctx_id); r = dss_init(); if (r) { DSSERR("Failed to initialize DSS\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_RFBI r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto fail0; } #endif r = dpi_init(); if (r) { DSSERR("Failed to initialize dpi\n"); goto fail0; } r = dispc_init(); if (r) { DSSERR("Failed to initialize dispc\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_VENC r = venc_init(); if (r) { DSSERR("Failed to initialize venc\n"); goto fail0; } #endif if (cpu_is_omap34xx()) { #ifdef CONFIG_OMAP2_DSS_SDI r = sdi_init(); if (r) { DSSERR("Failed to initialize SDI\n"); goto fail0; } #endif #ifdef CONFIG_OMAP2_DSS_DSI r = dsi_init(); if (r) { DSSERR("Failed to initialize DSI\n"); goto fail0; } #endif } initialize_displays(pdata); r = initialize_sysfs(&pdev->dev); if (r) goto fail0; initialize_overlays(def_disp_name); dss_clk_disable_all(); return 0; /* XXX fail correctly */ fail0: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int skip_init = 0; int r; int i; core.pdev = pdev; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); r = dss_get_clocks(); if (r) goto fail0; dss_clk_enable_all_no_ctx(); core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); #ifdef CONFIG_FB_OMAP_BOOTLOADER_INIT /* DISPC_CONTROL */ skip_init = 1; if (pdata->default_device->phy.dsi.xfer_mode == OMAP_DSI_XFER_VIDEO_MODE) skip_init = 0; #endif r = dss_init(skip_init); if (r) { DSSERR("Failed to initialize DSS\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_RFBI r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto fail0; } #endif r = dpi_init(); if (r) { DSSERR("Failed to initialize dpi\n"); goto fail0; } r = dispc_init(); if (r) { DSSERR("Failed to initialize dispc\n"); goto fail0; } #ifdef CONFIG_OMAP2_DSS_VENC r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto fail0; } #endif if (cpu_is_omap34xx()) { #ifdef CONFIG_OMAP2_DSS_SDI r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto fail0; } #endif #ifdef CONFIG_OMAP2_DSS_DSI r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto fail0; } #endif } #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_OMAP2_DSS_DEBUG_SUPPORT) r = dss_initialize_debugfs(); if (r) goto fail0; #endif for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) DSSERR("device reg failed %d\n", i); if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } dss_clk_disable_all(); return 0; /* XXX fail correctly */ fail0: return r; }
/* PLATFORM DEVICE */ static int omap_dss_probe(struct platform_device *pdev) { struct omap_dss_board_info *pdata = pdev->dev.platform_data; int r = 0; int i; core.pdev = pdev; core.pdata = pdev->dev.platform_data; dss_init_overlay_managers(pdev); dss_init_overlays(pdev); if (cpu_is_omap44xx()) dss_init_writeback(pdev); /*Write back init*/ #ifdef HWMOD if (!cpu_is_omap44xx()) { r = dss_get_clocks(); if (r) goto err_clocks; } core.ctx_id = dss_get_ctx_id(); DSSDBG("initial ctx id %u\n", core.ctx_id); r = dss_init(pdev); if (r) { DSSERR("Failed to initialize DSS\n"); goto err_dss; } r = rfbi_init(); if (r) { DSSERR("Failed to initialize rfbi\n"); goto err_rfbi; } r = dpi_init(pdev); if (r) { DSSERR("Failed to initialize dpi\n"); goto err_dpi; } r = dispc_init(pdev); if (r) { DSSERR("Failed to initialize dispc\n"); goto err_dispc; } r = venc_init(pdev); if (r) { DSSERR("Failed to initialize venc\n"); goto err_venc; } if (cpu_is_omap34xx()) { r = sdi_init(skip_init); if (r) { DSSERR("Failed to initialize SDI\n"); goto err_sdi; } } if (!cpu_is_omap24xx()) { r = dsi_init(pdev); if (r) { DSSERR("Failed to initialize DSI\n"); goto err_dsi1; } if (cpu_is_omap44xx()) { r = dsi2_init(pdev); if (r) { DSSERR("Failed to initialize DSI2\n"); goto err_dsi2; } } } // == 2011.05.31 === [email protected] START #ifdef CONFIG_OMAP2_DSS_HDMI // TEDCHO_HDMI #if defined(CONFIG_PRODUCT_LGE_HUB) || defined(CONFIG_PRODUCT_LGE_JUSTIN) #else r = hdmi_init(pdev, hdmi_code, hdmi_mode); if (r) { DSSERR("Failed to initialize hdmi\n"); goto err_hdmi; } #endif #endif #endif // == 2011.05.31 === [email protected] END r = dss_initialize_debugfs(); if (r) goto err_debugfs; for (i = 0; i < pdata->num_devices; ++i) { struct omap_dss_device *dssdev = pdata->devices[i]; r = omap_dss_register_device(dssdev); if (r) { DSSERR("device %d %s register failed %d\n", i, dssdev->name ?: "unnamed", r); while (--i >= 0) omap_dss_unregister_device(pdata->devices[i]); goto err_register; } if (def_disp_name && strcmp(def_disp_name, dssdev->name) == 0) pdata->default_device = dssdev; } #ifdef HWMOD dss_clk_disable_all(); #endif return 0; err_register: dss_uninitialize_debugfs(); err_debugfs: #ifdef HWMOD #ifdef CONFIG_OMAP2_DSS_HDMI hdmi_exit(); err_hdmi: #endif if (cpu_is_omap44xx()) dsi2_exit(); err_dsi2: if (!cpu_is_omap24xx()) dsi_exit(); err_dsi1: if (cpu_is_omap34xx()) sdi_exit(); err_sdi: venc_exit(); err_venc: dispc_exit(); err_dispc: dpi_exit(); err_dpi: rfbi_exit(); err_rfbi: dss_exit(); err_dss: dss_clk_disable_all_no_ctx(); dss_put_clocks(); err_clocks: #endif return r; }