]> Git Repo - J-u-boot.git/blame - drivers/misc/fsl_devdis.c
net: mediatek: fix gmac2 usability for mt7629
[J-u-boot.git] / drivers / misc / fsl_devdis.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
03c22449
ZZ
2/*
3 * Copyright 2015 Freescale Semiconductor, Inc.
4 * Author: Zhuoyu Zhang <[email protected]>
03c22449 5 */
03de305e 6#include <config.h>
03c22449
ZZ
7#include <asm/io.h>
8#include <asm/arch-ls102xa/immap_ls102xa.h>
9#include <asm/arch-ls102xa/config.h>
10#include <linux/compiler.h>
11#include <hwconfig.h>
12#include <fsl_devdis.h>
13
14void device_disable(const struct devdis_table *tbl, uint32_t num)
15{
16 int i;
6cc04547 17 struct ccsr_gur __iomem *gur = (void *)CFG_SYS_FSL_GUTS_ADDR;
03c22449
ZZ
18
19 /*
20 * Extract hwconfig from environment and disable unused device.
21 */
22 for (i = 0; i < num; i++) {
23 if (hwconfig_sub("devdis", tbl[i].name))
24 setbits_be32(&gur->devdisr + tbl[i].offset,
25 tbl[i].mask);
26 }
27}
This page took 0.329399 seconds and 4 git commands to generate.