diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index c99580aabcf6..6a6df6e8bfd6 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -913,13 +913,13 @@ static int tegra_io_rail_prepare(unsigned int id, unsigned long *request,
 {
 	unsigned long rate, value;
 
-	*bit = id % 32;
+	*bit = BIT(id % 32);
 
 	/*
 	 * There are two sets of 30 bits to select IO rails, but bits 30 and
 	 * 31 are control bits rather than IO rail selection bits.
 	 */
-	if (id > 63 || *bit == 30 || *bit == 31)
+	if (id > 63 || *bit & IO_DPD_REQ_CODE_MASK)
 		return -EINVAL;
 
 	if (id < 32) {
@@ -979,9 +979,9 @@ int tegra_io_rail_power_on(unsigned int id)
 	if (err)
 		goto error;
 
-	tegra_pmc_writel(IO_DPD_REQ_CODE_OFF | BIT(bit), request);
+	tegra_pmc_writel(IO_DPD_REQ_CODE_OFF | bit, request);
 
-	err = tegra_io_rail_poll(status, BIT(bit), 0, 250);
+	err = tegra_io_rail_poll(status, bit, 0, 250);
 	if (err) {
 		pr_info("tegra_io_rail_poll() failed: %d\n", err);
 		goto error;
@@ -1010,9 +1010,9 @@ int tegra_io_rail_power_off(unsigned int id)
 		goto error;
 	}
 
-	tegra_pmc_writel(IO_DPD_REQ_CODE_ON | BIT(bit), request);
+	tegra_pmc_writel(IO_DPD_REQ_CODE_ON | bit, request);
 
-	err = tegra_io_rail_poll(status, BIT(bit), BIT(bit), 250);
+	err = tegra_io_rail_poll(status, bit, bit, 250);
 	if (err)
 		goto error;
 
