Files
u-boot/include/ide.h
Simon Glass 9398cb855e ide: Allow IDE_BUS() to be used without CONFIG_IDE
Using this macro, even bracketed with 'if (IS_ENABLED(CONFIG_IDE))'
causes a compile error if CONFIG_IDE is not enabled. Update the macros
to resolve this, so we can avoid #ifdefs in the C code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-08-08 16:53:16 -06:00

27 lines
608 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
#ifndef _IDE_H
#define _IDE_H
#include <blk.h>
#define IDE_BUS(dev) ((dev) / \
(IF_ENABLED_INT(CONFIG_IDE, CONFIG_SYS_IDE_MAXDEVICE) / \
IF_ENABLED_INT(CONFIG_IDE, CONFIG_SYS_IDE_MAXBUS)))
/**
* ide_set_reset() - Assert or de-assert reset for the IDE device
*
* This is provided by boards which need to reset the device through another
* means, e.g. a GPIO.
*
* @idereset: 1 to assert reset, 0 to de-assert it
*/
void ide_set_reset(int idereset);
#endif /* _IDE_H */